HTTP错误401.1 - 从本地IIS未经授权 [英] HTTP Error 401.1 - Unauthorized from Local IIS

查看:230
本文介绍了HTTP错误401.1 - 从本地IIS未经授权的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的本地计算机上创建了可在调试模式下正常运行的网站,但是当我将网站放在我机器的本地iis(7.5)上时,我得到了

I have created site on my local machine that works fine on debug mode but when i put the site on local iis (7.5) of my machine i get

HTTP错误401.1 - 未经授权
您无权使用您提供的凭据查看此目录或页面。

HTTP Error 401.1 - Unauthorized You do not have permission to view this directory or page using the credentials that you supplied.

身份验证设置
我有窗口启用模拟和Windows身份验证,禁用该部分中的所有其他内容

Authentication Settings I have windows impersonation and windows authentication enabled and everything else in that section is disabled

所有文件夹都具有完全权限

All the folder have full permissions

可以有谁告诉我发生了什么?

Can anyone tell me what's going on?

推荐答案

作为一个快速而又脏的修复,授予 IIS_IUSRS group 读取/执行修改对您的网络文件夹的权限... 但请勿在互联网面向服务器上进行此操作,请继续阅读....

As a quick and dirty fix, grant the IIS_IUSRS group Read/Execute or Modify permissions to your web folder... BUT DON'T DO THIS ON AN INTERNET FACING SERVER, read on....

要正确解决此问题,您应该为您的网站授予应用程序池标识读取/执行修改权限阳离子的网络文件夹。为此:

To fix this properly you should grant the Application Pool Identity for your site Read/Execute or Modify permissions to your application's web folder. To do this:


  1. 打开IIS管理器,导航到部署站点的网站或应用程序文件夹。

  2. 打开高级设置(位于右侧操作窗格)。

  3. 记下应用程序池名称然后关闭此窗口

  4. 双击身份验证图标以打开身份验证设置

  5. 禁用 Windows身份验证

  6. 右键单击匿名身份验证,然后单击编辑

  7. 选择应用程序池标识单选按钮单击确定

  8. 从左侧的IIS管理器树中选择应用程序池节点,然后选择在步骤3中记下的应用程序池名称。

  9. 右键单击并选择高级设置

  10. 展开流程模型设置,然后从内置帐户中选择 ApplicationPoolIdentity 下拉列表然后单击确定

  11. 再次单击确定以保存和关闭应用程序池高级设置pa ge

  12. 打开管理员命令行(右键单击CMD图标并选择以管理员身份运行。它会出现在你的开始菜单上,可能在附件下。

  13. 运行以下命令:

  1. Open IIS Manager, navigate to your website or application folder where the site is deployed to.
  2. Open Advanced Settings (it's on the right hand Actions pane).
  3. Note down the Application Pool name then close this window
  4. Double click on the Authentication icon to open the authentication settings
  5. Disable Windows Authentication
  6. Right click on Anonymous Authentication and click Edit
  7. Choose the Application pool identity radio button the click OK
  8. Select the Application Pools node from IIS manager tree on left and select the Application Pool name you noted down in step 3
  9. Right click and select Advanced Settings
  10. Expand the Process Model settings and choose ApplicationPoolIdentity from the "Built-in account" drop down list then click OK.
  11. Click OK again to save and dismiss the Application Pool advanced settings page
  12. Open an Administrator command line (right click on the CMD icon and select "Run As Administrator". It'll be somewhere on your start menu, probably under Accessories.
  13. Run the following command:

icacls< path_to_site> / grantIIS APPPOOL \< app_pool_name>(CI)(OI)(M)

例如:

icacls C:\inetpub \ www.root \mysite \ / grantIIS APPPOOL \DEFAULTAPPPOOL:( CI)(OI)(M)

如果一切顺利 icacls.exe 将报告:


processed file: c:\inetpub\wwwroot\mysite
Successfully processed 1 files; Failed processing 0 files

这篇关于HTTP错误401.1 - 从本地IIS未经授权的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆