Changed hosting + IIS 7.0 breaking changes

This last monday I migrated from the previous hosting company to a much better one (a link to it it's on the footer of all blogs in the community), which is also Spanish so for once I'm going more "national" instead of going for USA-based hosting providers. As usually happens, cheap is paid in other ways (lack of support, stagnant framework versions...) so I decided to invest more money and so far I've had a great technical support :)

I had some problems regarding the migration, but mostly were due to Microsoft's commitment of making every developer's life harder from time to time by introducing breaking changes.

They can be summarized in two groups:

  1. Some changes related to how IIS 7 behaves itself. In my case, the removal of <httpHandlers> and <httpModules> for <handlers> and <modules>.
  2. HttpContext.Current.Request not available in the IIS 7 Integrated mode. This one was even better. For 9 years we've been able to use that object in the Application_Start method of the Global.asax file, but now you can't due to a design change (if you're on a vhost like me, there is a Classic Mode but for IIS admins).

Basically the workaround for the second point consists on either removing calls to context (impossible in the case of Community Server 2007 due to it's architecture) or build a class to perform a lock and set a flag to true to detect that initial application starting call.

It is not that I don't see as good the benefits of the Integrated Pipeline, but the compatibility mode should be available at web.config level to avoid problems in vhosts, instead of forcing to change your code (if I didn't had the source code, I would have been in real trouble!).

Anyway, if you plan to publish a website done in ASP.NET 2.0 to 3.5 (which internally means "just ASP.NET 2.0"), make sure you check all the breaking stuff and fix it.

Tags: Development

Changed hosting + IIS 7.0 breaking changes article, written by Kartones. Published @