Creating virtual application/directory in physical folder on IIS/ASP.NET

前端 未结 2 666
死守一世寂寞
死守一世寂寞 2021-01-06 07:07

What I want to achieve is simple:

  • I have a website, say \"my-site\" - http://localhost
  • In this website I have a (physical) folder \"foo\" - <
2条回答
  •  耶瑟儿~
    2021-01-06 07:11

    I'm just answering for someone who has the same problem and found this topic.

    I added a permission to Everyone (in this case, it would be in the folder C:\InetPub\my-site\foo\). Then I printed on the page what user is executing the app in this folder...

    Something like:

    labelCurrentUser.Text = System.Security.Principal.WindowsIdentity.GetCurrent().Name;
    

    Then I removed the permission to everyone and added the user that I got.

提交回复
热议问题