简体   繁体   English

HTTP 错误 401.3 - 未经授权

[英]HTTP Error 401.3 - Unauthorized

I am getting this errror in my newly created website in Windows 7 and IIS 7.5.我在 Windows 7 和 IIS 7.5 中新创建的网站中收到此错误。 I created an SSL certificate and done binding new website.我创建了一个 SSL 证书并完成了新网站的绑定。

HTTP Error 401.3 - Unauthorized HTTP 错误 401.3 - 未经授权
You do not have permission to view this directory or page because of the access control list (ACL) configuration or encryption settings for this resource on the Web server.由于 Web 服务器上此资源的访问控制列表 (ACL) 配置或加密设置,您无权查看此目录或页面。

Earlier when I created the website, I selected 'application user(pass through authentication)' in 'Add Website' dialogue.早些时候,当我创建网站时,我在“添加网站”对话框中选择了“应用程序用户(通过身份验证)”。 and when I click "Test Settings ..." button, I get this error message:当我单击“测试设置...”按钮时,我收到此错误消息:

The server is configured to use pass-through authentication with a built-in account to access the specified physical path.服务器配置为使用带有内置帐户的直通身份验证来访问指定的物理路径。 However, IIS Manager cannot verify whether the built-in account has access.但是,IIS 管理器无法验证内置帐户是否具有访问权限。 Make sure that the application pool identity has Read access to the physical path.确保应用程序池标识对物理路径具有读取权限。 If this server is joined to a domain, and the application pool identity is NetworkService or LocalSystem, verify that \\$ has Read access to the physical path.如果此服务器已加入域,并且应用程序池标识为 NetworkService 或 LocalSystem,请验证 \\$ 对物理路径具有读取访问权限。 Then test these settings again.然后再次测试这些设置。

请看附件图片

Please suggest solution to this.请提出解决方案。

Thanks.谢谢。

I had the same issue, ensured my DefaultAppPool was running under ApplicationPoolIdentity and the DefaultAppPool had permissions to the folder, but some files still didn't load.我遇到了同样的问题,确保我的 DefaultAppPool 在 ApplicationPoolIdentity 下运行,并且 DefaultAppPool 对该文件夹具有权限,但某些文件仍未加载。

Turns out my problem was that the anonymous authentication user was set to someone else instead of ApplicationPoolIdentity原来我的问题是匿名身份验证用户被设置为其他人而不是 ApplicationPoolIdentity

Screenshot截屏在此处输入图片说明

Make sure that application pool of your website and website both are running under the same identity.确保您的网站和网站的应用程序池都以相同的身份运行。 Then make sure that this identity has required permissions on the virtual directory.然后确保此身份对虚拟目录具有所需的权限。 I had exact same issue and above two checks fixed it.我有完全相同的问题,上面的两次检查修复了它。

IIS 7 also creates "IUSR" as default user to access files via IIS. IIS 7 还会创建“IUSR”作为默认用户以通过 IIS 访问文件。 So make sure user IUSR has read access to files/folders.因此,请确保用户 IUSR 具有对文件/文件夹的读取权限。

How to check if IUSR has read Access?如何检查IUSR是否具有读取权限? Right Click -> Folder -> Properties -> Security Tab See if IUSR is in Group or user names list, If No.右键单击 -> 文件夹 -> 属性 -> 安全选项卡查看 IUSR 是否在组或用户名列表中,如果没有。

Click Edit -> Add -> Advanced -> Find Now -> Select IUSR and click OK -->click Apply单击编辑 -> 添加 -> 高级 -> 立即查找 -> 选择 IUSR 并单击确定 --> 单击应用

The below worked for me.以下为我工作。 I did not set up an SSL, just a new website within IIS.我没有设置 SSL,只是在 IIS 中设置了一个新网站。 Upon doing so I was immediately unable to access the website with this error message.这样做后,我立即无法访问带有此错误消息的网站。

  1. When I created the new website, a new Application Pool was also created.当我创建新网站时,也创建了一个新的应用程序池。 The Identity of this Application Pool was set to ApplicationPoolIdentity .此应用程序池的标识设置为ApplicationPoolIdentity As mentioned by Suhas , the Application Pool of the website and the website itself must be running under the same identity.正如 Suhas 所提到的,网站的应用程序池网站本身必须以相同的身份运行。 (I do not know how to check the identity of the website, but the Application Pool's Identity can be checked by going to Application Pools and looking at the Identity column). (我不知道如何检查网站的身份,但可以通过进入应用程序池并查看身份列来检查应用程序池身份)。 The default Application Pool name is DefaultAppPool .默认应用程序池名称是DefaultAppPool 在此处输入图片说明

  2. I added permissions to the site (right click the site name -> Edit Permissions -> Security -> Edit -> Add), linking the site to the DefaultAppPool object, which in turn gives the site access to the default user and it's settings.我向站点添加了权限(右键单击站点名称 -> 编辑权限 -> 安全性 -> 编辑 -> 添加),将站点链接到DefaultAppPool对象,这反过来又使站点可以访问默认用户及其设置。 (The default user is created when IIS is installed. Read more about this in Microsoft's docs ). (默认用户是在安装 IIS 时创建的。在Microsoft 的文档中阅读有关此内容的更多信息)。 在此处输入图片说明

  3. I thought this would be all that's needed to obtain access, but this is incorrect.我认为这就是获得访问权限所需的全部内容,但这是不正确的。 The website's Application Pool must also be set to DefaultAppPool .网站的应用程序池也必须设置为DefaultAppPool This can be done by right clicking on the site -> Manage Website -> Advanced Settings -> Change the Application Pool value to DefaultAppPool .这可以通过右键单击站点 -> 管理网站 -> 高级设置 -> 将应用程序池值更改为DefaultAppPool 在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM