05 December 2011

Differences between ASP.NET applications deployed in IIS6 & IIS7

In general, web applications targetted at IIS6 would be able to run in IIS7 using the Classic Pipeline.
However, to take advantage of the new features and performance improvements in IIS7, the recommendation is to use the Integrated Pipeline.

The differences due to the change in pipeline modes could result in:
  1. Changes in Web.Config
  2. Changes in Application Code
Changes in Web.Config
If the application uses HTTP modules or handlers, the following needs to be changed:
  • system.web section is now system.webServer
  • system.web/httpModules is now system.webServer/modules
  • system.web/httpHandlers is now system.webServer/handlers
  • Some minor syntactical changes to the new elements (e.g. mandatory name attribute, etc.)
Changes in Application Code
With the new pipeline, the Request object/ information will no longer be available through the HttpContext.Current property in Application_Start in global.asax.

For completeness, there are other less used and known incompatible changes highlighted here relating to impersonating, authentication, authorisation.

No comments: