ASP.NET中的线程权限 [英] Thread permissions in ASP.NET

查看:54
本文介绍了ASP.NET中的线程权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在ASP.NET页中的新线程上开始进行冗长的导入.

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

一切正常. ,当我尝试从辅助线程写入日志文件时,我获得了失败的IO权限,这在主线程中不是问题.

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.

我在没有模拟的情况下使用IIS7集成模式,尽管在经典模式下使用模拟获得了相同的结果.

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

问题几乎与这个问题,只有我没有Response.Redirect,并且在接受的答案中看不到任何适用的修复程序.

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

编辑:我需要解决此问题而不重新配置服务器权限.足够的权限已经到位,无论如何我都无法在目标计算机上访问此权限.

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.

推荐答案

尝试授予IIS_WPG组对您的日志文件的访问权限.

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'.

这篇关于ASP.NET中的线程权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆