IIS 与 Windows 身份验证绑定
我有一个使用 Windows 身份验证的本地网站 (http://localhost/testsite),效果很好。
现在,我使用 Windows 更改了网站与 URL (http://testsite.blablabla.biz) 的绑定身份验证导致 HTTP 401.1 - 未经授权,您无权使用您提供的凭据查看此目录或页面
错误。
我做错了什么?我已经在谷歌上搜索了很多,但没有什么真正有帮助的。我认为这与域名或其他东西有关,但我不确定。
I have a local website (http://localhost/testsite) with Windows Authentication, that works well.
Now I changed the binding of the site to an URL (http://testsite.blablabla.biz) with Windows Authentication which leads to an HTTP 401.1 - Unauthorized You do not have permission to view this directory or page using the credentials that you supplied
error.
What am I doing wrong? I searched already a lot on google, but nothing really helps. I think it has something to do with domain names or something, but I'm not sure.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
Windows 具有进行环回检查的安全功能,旨在帮助防止对计算机的反射攻击。
当您使用自定义主机头浏览托管在运行 IIS 的计算机上的本地网站时,如果该网站使用 Windows 身份验证并且具有映射到本地环回地址的名称,您将收到此错误消息。
有两种方法可以解决此问题:
Microsoft 知识库文章 ID:896861
Windows has a security feature for doing loopback checks, which is designed to help prevent reflection attacks on your computer.
When you use a custom host header to browse a local web site that is hosted on a computer running IIS you will receive this error message if the web site uses Windows authentication and has a name that is mapped to the local loopback address.
There are two methods to work around this issue:
Microsoft KB Article ID: 896861
以下是我编写的用于管理环回检查设置的 PowerShell commandlet。它包含尝试获取所有使用 Windows 身份验证的 IIS 网站的主机名并设置反向连接主机名的代码。
Here are the PowerShell commandlets that I wrote to manage the loopback check settings. It includes code that attempts to get the hostnames for all IIS web sites that use Windows Authentication and sets the back connection host names.
请注意,通过更改绑定,您在网络浏览器中以前的 URL 可能无法再次访问此网站。了解什么是绑定,您应该找出是否做错了什么。
因此,为您提供此 401.1 的网站可能完全是另一个网站。
Note that by changing binding, this site may not be accessed again by your previous URL in web browsers. Learn about what is a binding and you should find out if you did something wrong.
So the site that gives you this 401.1 can be completely another site.