Welcome to Bilal Haidar [MVP, MCT] Official Blog Sign in | Join | Help

HttpModules and IIS 7

When working with an ASP.NET Web Application under Vista/IIS 7 and developing an HttpModule, watch out for the Application pool you are using. If your application is configured to work with classic application pool, then it is enough to define the module within the httpModules section as:

<httpModules>
       <add name="MyModule" type="MyModule" />
</httpModules>

If however, you have configured your web application to work with Default Application Pool (i.e. integrated mode), then you should add another entry to your web.config file as follows:

    <!--
  The system.webServer section is required for running ASP.NET AJAX under Internet
  Information Services 7.0. It is not necessary for previous version of IIS.
 -->
    <system.webServer>
        <validation validateIntegratedModeConfiguration="false" />
        <modules>
                <add name="MyModule" preCondition="integratedMode" type="MyModule" />
        </modules>
    </system.webServer> 

 

Thanks for my friend Wessam for hinting this to me!!
Regards 

 

Published Wednesday, September 12, 2007 10:28 PM by BilalHaidar [MVP]

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# WOOOOOOOOOOOW - You helped me big time

Hi,

Man, you maked my day... I was trying for a day or so to fix this and I didn't had any clue...

Thanks

Friday, July 11, 2008 12:36 AM by Software Developer

Leave a Comment

(required) 
required 
(required)