使用windows auth在IIS 10本地工作站401.1和401.2错误设置网站。

时间:2021-04-30 18:12:18

I have been going through other threads related to this, but for some reason I just cant get the past the authentication issue(s). Im setting up a new website on my local windows 10 workstation, leaving the default website intact. Basically, doing the same steps as here http://www.thejoyofcode.com/Setting_up_two_web_sites_in_IIS7.aspx
- Setup an alias in my hosts file
- Setup the new website in IIS (in my case using v10)
- Enable windows auth, disable anonymous auth
- Set the app pool to run under [NETWORK SERVICE]
- Under windows auth, make sure "Extended protection" is set to "Accept" and Kernel mode auth is checked
- [NETWORK SERVICE] has full permissions to the root folder where the files for the website are located
- The windows auth providers are sorted so that NTLM comes first.

我一直在讨论与此相关的其他线程,但由于某种原因,我无法通过身份验证问题。我在本地的windows 10工作站建立了一个新的网站,保留了默认的网站。基本上,做相同的步骤如下:http://www.thejoyofcode.com/Setting_up_two_web_sites_in_IIS7.aspx—在我的主机文件中设置一个别名——在IIS中设置新网站(在我的例子中使用v10) -启用windows auth,禁用匿名的auth -设置应用程序池在[网络服务]下运行-在windows auth下,确保“扩展保护”被设置为“Accept”,而内核模式auth被选中——[网络服务]对根文件夹有完全的权限,在该文件夹中,该网站的文件都位于该文件夹中——windows auth提供程序已被排序,因此NTLM首先出现。

When I try to request the url by the alias I have in the hosts file, I get a 401.1 error.

当我试图通过在主机文件中的别名请求url时,我得到了401.1错误。

As other testing, I dropped a simple test.html file in the root path and selected "browse" from my IIS admin tool and it displayed. Not so when I selected an aspx file and tried to browse. Yet both failed when trying them via a url.

作为其他测试,我放弃了一个简单的测试。根路径中的html文件,并从IIS管理工具中选择“浏览”,然后显示。当我选择一个aspx文件并试图浏览时,情况并非如此。然而,在通过url进行尝试时,两者都失败了。

[Update1]
When I try via url: HTTP Error 401.1 - Unauthorized

[Update1]当我尝试通过url: HTTP错误401.1 -未经授权。

Looking in the IIS log, I see lines like this 2016-08-29 18:04:02 127.0.0.1 GET /Default.aspx - 80 - 127.0.0.1 Mozilla/5.0+(Windows+NT+10.0;+WOW64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/52.0.2743.116+Safari/537.36 - 401 2 5 571

查看IIS日志,我看到了这样的行:2016-08-29 18:04:02 127.0.0.1 GET /Default。Mozilla/5.0+(Windows+NT+10.0;+WOW64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/52.0.2743.116+Safari/537.36 - 401 2 571。

1 个解决方案

#1


0  

One solution that comes in mind is the infamous Loopback Check.

其中一个解决方案就是臭名昭著的环回检查。

loopback check security feature that is designed to help prevent reflection attacks on your computer. Therefore, authentication fails if the FQDN or the custom host header that you use does not match the local computer name.

环回检查安全特性,它的目的是帮助防止反射攻击你的计算机。因此,如果您使用的FQDN或自定义主机头与本地计算机名称不匹配,则验证失败。

Source: https://support.microsoft.com/en-us/kb/896861

来源:https://support.microsoft.com/en-us/kb/896861

Follow the solution given on the above link and it should solve the issue.

按照上面的解决方案,解决问题。

#1


0  

One solution that comes in mind is the infamous Loopback Check.

其中一个解决方案就是臭名昭著的环回检查。

loopback check security feature that is designed to help prevent reflection attacks on your computer. Therefore, authentication fails if the FQDN or the custom host header that you use does not match the local computer name.

环回检查安全特性,它的目的是帮助防止反射攻击你的计算机。因此,如果您使用的FQDN或自定义主机头与本地计算机名称不匹配,则验证失败。

Source: https://support.microsoft.com/en-us/kb/896861

来源:https://support.microsoft.com/en-us/kb/896861

Follow the solution given on the above link and it should solve the issue.

按照上面的解决方案,解决问题。