windows 请求的 IIS 文件授权失败

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/8752000/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 09:04:56  来源:igfitidea点击:

IIS File authorization failed for the request

windowsiisiis-7windows-server-2008

提问by Jim

I am trying to access a webpage on our local web server. When I browse to the page I get the windows auth challange. Even if i try to enter my credentials it keeps asking again. As you can see from the below error message i am authenticated.

我正在尝试访问我们本地 Web 服务器上的网页。当我浏览到该页面时,我收到了 windows auth challange。即使我尝试输入我的凭据,它也会再次询问。正如您从以下错误消息中看到的,我已通过身份验证。

I checked the user account and it has access to the root folder and all lower folders. I get this error message for all sites in IIS

我检查了用户帐户,它可以访问根文件夹和所有较低的文件夹。我在 IIS 中的所有站点都收到此错误消息

Any advice?

有什么建议吗?

Log Name:      Application
Source:        ASP.NET 4.0.30319.0
Date:          1/5/2012 4:12:33 PM
Event ID:      1314
Task Category: Web Event
Level:         Information
Keywords:      Classic
User:          N/A
Computer:      SALTIIS01

Description:
Event code: 4008 
Event message: File authorization failed for the request. 
Event time: 1/5/2012 4:12:33 PM 
Event time (UTC): 1/6/2012 12:12:33 AM 
Event ID: 349fcb2ec3c24b16a862f6eb9b23dd6c 
Event sequence: 7 
Event occurrence: 3 
Event detail code: 0 

Application information: 
    Application domain: /LM/W3SVC/2/ROOT/Application/SNCDW-19-129702818025409890 
    Trust level: Full 
    Application Virtual Path: /Application/SNCDW 
    Application Path: D:\Sites\WCF\Application\SNCDW\ 
    Machine name: SALTIIS01 

Process information: 
    Process ID: 1896 
    Process name: w3wp.exe 
    Account name: iisservice 

Request information: 
    Request URL: http://webservicestest/Application/SNCDW/PC.svc 
    Request path: /Application/SNCDW/PC.svc 
    User host address: 10.60.16.79 
    User: js3228 
    Is authenticated: True 
    Authentication Type: Negotiate 
    Thread account name: iisservice 

Custom event details:

自定义活动详情:

Event Xml: <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event"> <System> <Provider Name="ASP.NET 4.0.30319.0" /> <EventID Qualifiers="16384">1314</EventID> <Level>4</Level> <Task>3</Task> <Keywords>0x80000000000000</Keywords> <TimeCreated SystemTime="2012-01-06T00:12:33.000000000Z" /> <EventRecordID>4189</EventRecordID> <Channel>Application</Channel> <Computer>SALTIIS01.intranet.com</Computer> <Security /> </System> <EventData> <Data>4008</Data> <Data>File authorization failed for the request.</Data> <Data>1/5/2012 4:12:33 PM</Data> <Data>1/6/2012 12:12:33 AM</Data> <Data>349fcb2ec3c24b16a862f6eb9b23dd6c</Data> <Data>7</Data> <Data>3</Data> <Data>0</Data> <Data>/LM/W3SVC/2/ROOT/Application/SNCDW-19-129702818025409890</Data> <Data>Full</Data> <Data>/Application/SNCDW</Data> <Data>D:\Sites\WCF\Application\SNCDW\</Data> <Data>SALTIIS01</Data> <Data> </Data> <Data>1896</Data> <Data>w3wp.exe</Data> <Data>iisservice</Data> <Data>http://webservicestest/Application/SNCDW/PC.svc</Data> <Data>/Application/SNCDW/PC.svc</Data> <Data>10.60.16.79</Data> <Data>js3228</Data> <Data>True</Data> <Data>Negotiate</Data> <Data>iisservice</Data> </EventData> </Event>

事件 XML: <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event"> <System> <Provider Name="ASP.NET 4.0.30319.0" /> <EventID Qualifiers="16384">1314</EventID> <Level>4</Level> <Task>3</Task> <Keywords>0x80000000000000</Keywords> <TimeCreated SystemTime="2012-01-06T00:12:33.000000000Z" /> <EventRecordID>4189</EventRecordID> <Channel>Application</Channel> <Computer>SALTIIS01.intranet.com</Computer> <Security /> </System> <EventData> <Data>4008</Data> <Data>File authorization failed for the request.</Data> <Data>1/5/2012 4:12:33 PM</Data> <Data>1/6/2012 12:12:33 AM</Data> <Data>349fcb2ec3c24b16a862f6eb9b23dd6c</Data> <Data>7</Data> <Data>3</Data> <Data>0</Data> <Data>/LM/W3SVC/2/ROOT/Application/SNCDW-19-129702818025409890</Data> <Data>Full</Data> <Data>/Application/SNCDW</Data> <Data>D:\Sites\WCF\Application\SNCDW\</Data> <Data>SALTIIS01</Data> <Data> </Data> <Data>1896</Data> <Data>w3wp.exe</Data> <Data>iisservice</Data> <Data>http://webservicestest/Application/SNCDW/PC.svc</Data> <Data>/Application/SNCDW/PC.svc</Data> <Data>10.60.16.79</Data> <Data>js3228</Data> <Data>True</Data> <Data>Negotiate</Data> <Data>iisservice</Data> </EventData> </Event>

采纳答案by Mitchell4500

Be sure all IIS related users have access, heres some:

确保所有与 IIS 相关的用户都可以访问,以下是一些:

  • iisservice
  • IUSR
  • IIS_IUSRS
  • Network Service
  • 服务
  • IUSR
  • IIS_IUSRS
  • 网络服务

Also if your using websitepanel be sure to allow its users too.

此外,如果您使用网站面板,请确保也允许其用户。

回答by Unmesh Kondolikar

Give read access to

授予读取权限

IIS AppPool\YourAppPool

IIS 应用程序池\您的应用程序池

on the root folder of the website.

在网站的根文件夹中。

回答by SharpC

I couldn't get it to work until I gave Everyoneaccess.

在我授予Everyone访问权限之前,我无法让它工作。

  1. Open Windows Explorer
  2. Select the website folder e.g. C:\inetpub\wwwroot\MyWebsite.
  3. Right click the file and select "Properties"
  4. Select the "Security" tab
  5. Click the "Edit" and then "Add" button
  6. Click the "Locations" button and make sure you select the localmachine. (Notthe Windows domain if the server belongs to one.)
  7. "Enter the object names to select:" text box enter Everyone.
  8. Click the "Check Names" button and click "OK".
  1. 打开 Windows 资源管理器
  2. 选择网站文件夹,例如C:\inetpub\wwwroot\MyWebsite
  3. 右键单击文件并选择“属性”
  4. 选择“安全”选项卡
  5. 单击“编辑”,然后单击“添加”按钮
  6. 单击“位置”按钮并确保选择本地计算机。(如果服务器属于其中一个,则不是Windows 域。)
  7. “输入要选择的对象名称:”文本框输入Everyone
  8. 单击“检查名称”按钮,然后单击“确定”。