Brent Offner

don't panic!

  Home  |   Contact  |   Syndication    |   Login
  2 Posts | 0 Stories | 2 Comments | 0 Trackbacks

News

Archives

Tuesday, August 23, 2011 #

I had a bit a of trouble today getting some classic ASP pages to load in IIS 7. Here is what I had to do:

  1. 1. Install ASP Feature for IIS if it is not installed.
    Server Manager -> Roles -> "Role Services" section : Check ASP under Application Development.
  2. 2. Check your application host config file for the line:
    <add name="ASPClassic" path="*.asp" verb="GET,HEAD,POST" modules="IsapiModule" scriptprocessor="C:\Windows\System32\inetsrv\asp.dll" resourcetype="File" precondition="bitness64" />
    You need to remove: preCondition="bitness64"
  3. 3. Change your handler mapping for class ASPClassic.
    Instead of "C:\Windows\System32\inetsrv\asp.dll" you should be loading "C:\Windows\SysWOW64\inetsrv\asp.dll"
  4. 4. Recycle App Pool and you should be good to go.

Wednesday, February 23, 2011 #

A coworker had this conversation with another of our developers. Names have been changed to protect the guilty.

Clueless: hey!
Clueless: I am using the ?? operator for null check below

Nice Guy: hey

Clueless:
FundLoanRequestBoatCollateral boatCollateral = request.BoatCollateral ?? null;


Nice Guy:
that's not exactly how it works

Clueless: I want to achive:
FundLoanRequestBoatCollateral boatCollateral = request.BoatCollateral != null ? request.BoatCollateral : null;
Clueless: isnt that equal to: 
FundLoanRequestBoatCollateral boatCollateral = request.BoatCollateral ?? null;

Nice Guy: that is functionally equivalent to
FundLoanRequestBoatCollateral boatCollateral = request.BoatCollateral

Nice Guy: you're checking if it's null and if so setting it to null

Clueless: yeah
Clueless: if its null I want to set it to null

Nice Guy: if it's null then you're already going to set it to null, no special logic needed
Clueless: I wanted to avoid a null reference if BoatCollateral is null

 

The sad part of all of this is that "Clueless" has been with our company for years and has a Master's in Computer Science.