Geo*_*ge2 9 .net c# iis iis-7 visual-studio-2008
我正在使用VSTS 2008 + C#+ .Net 3.5 + IIS 7.0.我创建了一个新的网站,并将一个html文件放入该目录.当我在IIS管理器中使用浏览功能浏览html文件时,我遇到了以下错误,任何想法有什么问题?
顺便说一句:因为我在管理员帐户下运行工作进程,所以我对未经授权的错误非常困惑.从错误消息,我很困惑,为什么登录方法是匿名的,而不是使用管理员帐户?
HTTP Error 401.3 - Unauthorized
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.
Module IIS Web Core
Notification AuthenticateRequest
Handler StaticFile
Error Cde 0x80070005
Requested URL http://localhost:80/a.html
Physical Path C:\test\simplehosttest\a.html
Logon Method Anonymous
Logon User Anonymous
Run Code Online (Sandbox Code Playgroud)
Lex*_* Li 17
C:\测试\ simplehosttest\a.html
请授予IUSR帐户对此文件或其文件夹的必要权利.然后401.3错误将消失.
小智 14
在IIS 8.5(全新安装)中,我将应用程序池作为自定义标识运行,文件存储在/ inetpub/wwwroot之外的文件夹中.身份具有所有正确的文件权限,但仍然有一个acl错误.
经过一番努力,我发现在IIS管理器 - >我的站点 - >身份验证 - >匿名身份验证 - >编辑中,默认情况下,用于匿名身份验证的身份设置为特定用户(IUSR).设置它使用应用程序池标识为我修复它!