I followed a tutorial to implement LDAP authentication in an ASP.NET/C# 4.0 web application. I did so in Visual Studio 2010. The site runs fine in debug mode through Visual Studio, but when I publish this site in IIS7, it is failing with the following error:
HTTP Error 500.24 - Internal Server Error An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode.
Most likely causes:
- system.web/identity@impersonate is set to true.
In fact, part of the tutorial required that I add this to the config file...
<identity impersonate="true"/>
So why would I be getting this error and how do I fix it?
Try changing your application pool's pipeline mode to 'Classic'
You do this by opening IIS -> Application Pools -> Right-click your application pool and select Basic Settings -> Managed pipline mode, change to Classic
Restart your app pool and site (shouldn't need to but never hurts to try) and try again.
Another thing you can try, instead of the above, is to put the following in your web.config
file, inside the <system.webServer>
node:
<validation validateIntegratedModeConfiguration="false" />