Sometime when you try to setup a application for your website on IIS7 you get following error when you load your website.

HTTP Error 500.24 – Internal Server Error
An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode.

This happens when ASP.NET modules and handlers should be specified in the IIS and configuration sections in Integrated mode. This problem can be fixed using following workaround

1) Change application configuration: First way to fix this issue is to migrate the application configuration to work properly in Integrated mode. You can use AppCmd command to migrate the application configuration:

%windir%/system32/inetsrv/>Appcmd migrate config “<AppPath>”

Where <AppPath> is the virtual path of the application, such as “Default Web Site/virtualapp1“.

2) Modify web.config: You have to manually move the customer entries in the <system.web>/<httpModules> and configuration to the <system.web>/<httpHandlers><system.webServer>/<handlers> and <system.webServer>/<modules> configuration sections, and either remove the <httpHandlers> and <httpModules> configuration OR add the following to your application’s or websites web.config:

<system.webServer>
<validation validateIntegratedModeConfiguration=”false”/>

</system.webServer>

3) Switch to Classic ASP.NET: Switch the website or application to an application pool that is configured to run in Classic ASP.NET mode. To move back to classic mode go to IIS7 Manager >> Select the site (which you want to switch) >> edit settings and you will get following screen


Press “Select” button which will open a window “Select Application Pool” (check below image); Select “Classic .NET AppPool” from the drop-down and press OK.


Now try to Access your website/application.