gpt4 book ai didi

configuration - IIS 7.0 中的模拟

转载 作者:行者123 更新时间:2023-12-04 11:33:02 24 4
gpt4 key购买 nike

我有一个在 IIS 6.0 下正常工作的网站:它使用 Windows 凭据对用户进行身份验证,然后在与访问数据库的服务交谈时,它传递凭据。

在 IIS 7.0 中,相同的配置设置不会传递凭据,并且 DB 会被 NT AUTHORITY\ANONYMOUS 命中。

有什么我想念的吗?我在我的 IIS 7.0 网站中关闭了匿名访问,但我无法让它工作。

这些是我在 IIS 6.0 和 7.0 上使用的设置:

<authentication mode="Windows">
<identity impersonate="true">

从 6.0 到 7.0 有什么变化?

最佳答案

IIS7 和 IIS6.0 之间发生了变化。我为您找到了一篇可能对您有所帮助的博客文章 (click here to see it)。

您是在集成模式还是经典模式下运行应用程序?从我看到的情况来看,将 Impersonate 属性设置为 true 应该会显示 500 错误并显示以下错误消息:

Internal Server Error. This is HTTP Error 500.19: The requested page cannot be accessed because the related configuration data for the page is invalid.



这是建议的解决方法:

Workaround:

1) If your application does not rely on impersonating the requesting user in the BeginRequest and AuthenticateRequest stages (the only stages where impersonation is not possible in Integrated mode), ignore this error by adding the following to your application’s web.config:

<validation validateIntegratedModeConfiguration="false"

/>

2) If your application does rely on impersonation in BeginRequest and AuthenticateRequest, or you are not sure, move to classic mode.



我希望这有助于了解 IIS 7.0 现在的工作方式。

关于configuration - IIS 7.0 中的模拟,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10435/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com