IIS 7.0中的模拟
我有一个在IIS 6.0下可以正常工作的网站:它使用Windows凭据对用户进行身份验证,然后与访问数据库的服务进行通讯时,它会传递凭据。
在IIS 7.0中,相同的配置设置不会传递凭据,并且数据库会被NT AUTHORITY \ ANONYMOUS命中。
有什么我想念的吗?我已经在IIS 7.0网站中关闭了匿名访问功能,但无法正常工作。
这些是我在IIS 6.0和7.0上都使用的设置:
<authentication mode="Windows"> <identity impersonate="true">
从6.0更改为7.0是什么?
解决方案
回答
有趣的是...我遇到了相反的问题无法通过防火墙从大型浏览器中的Web服务器和客户端浏览器传递身份验证。
我还认为对数据库进行"端到端用户"身份验证是一个坏主意,并且存在潜在的安全风险。没有什么可以阻止最终用户加载SQL Query并直接连接到数据库,因此最好锁定架构!
@Esteban阐明了我对回答不是很有用。
回答
通常,如果我们要像这样进行双跳身份验证,则除非第一个身份验证为基本身份验证,否则通常会涉及Kerberos。
我将检查IIS 6服务器上的身份验证,并确保它与IIS 7上的身份验证相同。
如果IIS 6框设置为Windows Integrated,则需要验证kerberos设置SPN,委派等。
回答
是否已将IIS服务器设置为由SQLServer信任以进行委派?在WebDAV之前,我曾遇到过这种情况,我们必须让运行IIS的服务器受文件服务器信任才能代表文件服务器进行身份验证。
回答
在IIS7和IIS6.0之间进行了更改。我为我们找到了一篇可能实际上对我们有帮助的博客文章(单击此处查看它)。
我们是在集成模式还是经典模式下运行应用程序?从我看到的结果来看,将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现在的工作很有用。