HttpModule Correctly Created, but doesn't work

If you’ve created your HttpModule correctly but when you open your web it doesn’t work, it could be a configuration error. You should open your web.config and check if your HttpModule is correctly added, because it’s differente between IIS versions:
IIS 6

<system.web>
  <httpModules>
    <add name="myModule" type="myModuleNamespace.myModuleClass"/>
  </httpModules>
</system.web>

IIS 7+

<system.webServer>
  <modules runAllManagedModulesForAllRequests="true">
    <add name="myModule" type="myModuleNamespace.myModuleClass"/>
  </modules>
</system.webServer>

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.