UNC access whilst using impersonation asp.net

不想你离开。 提交于 2019-12-11 11:07:39

问题


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?


回答1:


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.




回答2:


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


来源:https://stackoverflow.com/questions/11120829/unc-access-whilst-using-impersonation-asp-net

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!