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?
Use Internet Information Services (IIS) Manager to disable anonymous authentication for the application and enable integrated windows authentication. In the application's Web. config file, set the impersonate attribute in the identity element to true.
web/identity@impersonate is set to true. Things you can try: If the application supports it, disable client impersonation. If you are certain that it is OK to ignore this error, it can be disabled by setting system.
ASP.NET Impersonation AuthenticationOpen IIS Manager and navigate to the level you want to manage. In Features View, double-click Authentication. On the Authentication page, select ASP.NET Impersonation. In the Actions pane, click Enable to use ASP.NET Impersonation authentication with the default settings.
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" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With