我一直在ASP.NET Web应用程序(如下)中收到此错误。我给网络服务帐户权限指定的文件夹,它运行良好一段时间,但然后在一两天内错误再次出现,因为网络服务帐户已从该文件夹的权限中删除。再次添加它可以修复它,但它为什么保持reocurring?当前标识没有对“Temporary ASP.NET Files”目录的写入权限
难道它与使用Interop组件(如WMI)有关吗?
以下是完整的错误:
Server Error in '/DriveMonitor' Application.
--------------------------------------------------------------------------------
The current identity (NT AUTHORITY\NETWORK SERVICE) does not have write access to 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.HttpException: The current identity (NT AUTHORITY\NETWORK SERVICE) does not have write access to 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files'.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[HttpException (0x80004005): The current identity (NT AUTHORITY\NETWORK SERVICE) does not have write access to 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files'.]
System.Web.HttpRuntime.SetUpCodegenDirectory(CompilationSection compilationSection) +8918190
System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags hostingFlags) +152
[HttpException (0x80004005): The current identity (NT AUTHORITY\NETWORK SERVICE) does not have write access to 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files'.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +8890735
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +85
System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +259
你在使用什么操作系统? – James 2010-05-06 08:59:01
Server 2003 SP2 – tuseau 2010-05-07 08:31:03