Thread permissions in ASP.NET

你。 提交于 2019-12-11 16:36:13

问题


I'm launching a lengthy import on a new thread in an ASP.NET page.

Everything is working fine except that I get a failed IO permission when I try to write to my log file from the worker thread, which is not a problem in the primary thread.

I am using IIS7 integrated mode without impersonation, although I got the same results with impersonation in classic mode.

The problem is almost identical to this one, only I have no Response.Redirect and see no applicable fix in the accepted answer.

EDIT: I need to solve this without reconfiguring server permissions. Adequate permissions are already in place, and I have no access to this on the target machine anyway.


回答1:


Try to give the IIS_WPG group access to your logfile.

Your request probably runs with the account you defined for 'anonymous access' while to worker thread runs as 'network service'.



来源:https://stackoverflow.com/questions/778606/thread-permissions-in-asp-net

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