Unauthorized access error to html pages in IIS 7.0

后端 未结 5 720
广开言路
广开言路 2021-02-06 03:02

I am using VSTS 2008 + C# + .Net 3.5 + IIS 7.0. I have created a new web site and put an html file into the directory. And when I use browse function in IIS manager to browse th

相关标签:
5条回答
  • 2021-02-06 03:29

    I had the same problem, but neither of the suggested fixes solved my problem. I was trying to deploy an ASP.Net 4.0 web application with Forms Authentication on IIS7 on Windows Server 2008. What solved the problem was providing read and script permissions to the handlers, which can be accomplished by opening Handler Mappings and then selecting "Edit Feature Permissions" from the right menu.

    0 讨论(0)
  • 2021-02-06 03:30

    I found another cause of this problem in that the website I was deploying was sent to me in a zip file. For some reason (maybe because the files were built on a Mac) the files where coming over with the Encrypted for Security bit set. The files show up as green in Windows Explorer.

    0 讨论(0)
  • 2021-02-06 03:37

    In IIS 8.5 (fresh install) I had my application pool run as a custom identity and the files stored in a folder outside /inetpub/wwwroot. The identity had all the proper file privileges, but still I got an acl error.

    After some struggles I found out that in IIS manager->My Site->Authentication->Anonymous Authentication->Edit the identity used for anonymous authentication was set to a specific user by default (IUSR). Setting it to use the application pool identity fixed it for me!

    0 讨论(0)
  • 2021-02-06 03:39

    C:\test\simplehosttest\a.html

    Please grant IUSR account necessary rights on this file or its folder. Then 401.3 error will disappear.

    0 讨论(0)
  • 2021-02-06 03:46

    Basically you have to grant read access to the file to the identity that runs your apppool in IIS. On 2008 server and Vista that identity (unless you have explicitly changed it) would be "NT Authority\Network Service" and on windows7 it's "IisAppPool\AppPoolIdentity" (and don't ask why they have done that on win7, it's a WTF if you ask me)

    0 讨论(0)
提交回复
热议问题