Migrating HttpHandlers from IIS 6 to IIS 7

I developed a set ASP.Net applications with VS 2005/2008 which recently needed to be installed on IIS7. Everything worked “out of the box” except for one application that implemented a combined HTML and WEBDAV browser on files stored in a database using an HttpHandler.

The application is configured as belonging to the DefaultAppPool (.Net 2.0, integrated pipeline).

Integrated Pipeline requires all registered HttpHandlers to be configured in the system.webServer/handlers section rather than in system.web/httpHandlers.

The following steps made the application run (and debug) again:

  • Move the original configuration
    <clear />
    <add path="DebugAttach.aspx" verb="DEBUG" type="System.Web.HttpDebugHandler" />
    <add verb="*" path="*" type="MyNamespace.MyHttpHandler, MyAssembly" />


  <handlers accessPolicy="Read, Execute, Script">
    <add name="DebugAttach" path="DebugAttach.aspx" verb="DEBUG"
      type="System.Web.HttpDebugHandler" />
    <add name="MyHandlerName" path="*" verb="*"
      type="MyNamespace.MyHttpHandler, MyAssembly" resourceType="Unspecified" />
  • Notice the “name” parameter in the handler entries
  • Enable the CGI-exe (CgiModule) and ISAPI-dll (IsapiModule) handler mappings


If you still experience errors, enable the Failed Request Tracing for the application in IIS Manager, and look at the generated trace files in C:\inetpub\logs\FailedReqLogFiles.

One Response to Migrating HttpHandlers from IIS 6 to IIS 7

  1. Tom Winter says:

    Do you know of a way to have the handlers in your web.config so that it will work with Classic AND Integrated, whichever the app pool happens to be using?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: