我一直在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