static void

IIS7 httpModules/httpHandlers vs Default ApplicationPool

Published Tuesday 10 August 2010

When installing a website built on XP/ IIS6 or the built-in Visual Studio Cassini, you put httpHandlers and httpModules in system.web.
On Windows Server 2008/ IIS7, you use system.webServer, with modules and handlers.

If you use the web.config in the standard Ajax-enabled template, this just works.

If not, it doesn't. IIS7 throws an error page.
Description: This application is running in an application pool that uses the Integrated .NET mode. This is the preferred mode for running ASP.NET applications on the current and future version of IIS.

In this mode, the application should not specify ASP.NET module components in the <system.web>/<httpModules> configuration section. Instead, it should use the <system.webServer>/<modules> configuration section to load ASP.NET module components.


The fix is in that Ajax web.config.
    <system.webServer>
        <validation validateIntegratedModeConfiguration="false"/>

It just turns off the validation, allowing system.web/httpModules etc to exist, but ignores them and uses the system.webServer/modules etc version.

Documentation is here.

Yes, this just happened to me. Doh.

Previously: IIS 7 has no handler for *.svc (10 Aug 2010)