问题描述
我按照教程在 ASP.NET/C# 4.0 Web 应用程序中实现 LDAP 身份验证.我在 Visual Studio 2010 中这样做了.该站点通过 Visual Studio 在调试模式下运行良好,但是当我在 IIS7 中发布该站点时,它失败并出现以下错误:
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 错误 500.24 - 内部服务器错误 ASP.NET 设置已被检测到不适用于集成托管管道模式.
HTTP Error 500.24 - Internal Server Error An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode.
最可能的原因:
- system.web/identity@impersonate 设置为 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'
您可以通过打开 IIS -> 应用程序池 -> 右键单击您的应用程序池并选择基本设置 -> 托管管道模式,更改为 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.
您可以尝试的另一件事是在 <system.webServer>
节点内的 web.config
文件中添加以下内容:
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" />
这篇关于IIS 抱怨使用 LDAP 身份验证的身份模拟的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!