UNC access whilst using impersonation asp.net

2019-07-23 21:04发布

I am trying to have my ASP.net application access a UNC path, however I am getting file denied errors.

If I try this where the application is on my local machine, it works, if I run it in the browser, where the application is deployed, it works fine.

However when I try to access the website from my machine to my IIS box, which then in-turn accesses the file server, I can Access Denied errors.

I've checked that ASP.Net is actually impersonatinh as me, and it seems to be that seems to be the case, however still the errors.

All the files on my file server have Access to "Everyone"

Any thoughts?

2条回答
戒情不戒烟
2楼-- · 2019-07-23 21:29

After our Tech Services team looking into this, it appears it was partly to do with Chrome/FF not sending WinAuth correctly, and also the IIS Windows Authenication -> Providers settings were the wrong way around:

Should be :

Negotiaton
NTLM
查看更多
smile是对你的礼貌
3楼-- · 2019-07-23 21:42

If I recall correctly, in the scenario, the web server (IIS) is making a request to a UNC share on different computer and it will not by default pass your authentication token on to the server with the UNC share. You will have to trust the IIS server or the app pool user for delegation to make it work. See this Technet article about delegation.

查看更多
登录 后发表回答