Unauthorized access error to html pages in IIS 7.0

后端 未结 5 809
广开言路
广开言路 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: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)

提交回复
热议问题