Wednesday, 21 July 2010

HTTP Modules In IIS 7

The entry for adding a HTTP Module in web.config has changed in IIS7.


Prior to IIS 7 a web config entry might look like

<system.web>

<httpModules>

<add name="startupModule" type="My.SuperHttpModule, My" />

</httpModules>

</system.web>

When using IIS 7 the entry moves from system.web to system.webServer and its name changes from httpModules to modules. A web .config entry might now look like

<system.webServer>

<modules runAllManagedModulesForAllRequests="true">

<add name="startupModule" type="My.SuperHttpModule, My" />

</modules>

</system.webServer>


No comments:

Post a Comment