2010-05-06 61 views
0

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

你在使用什么操作系统? – James 2010-05-06 08:59:01

+0

Server 2003 SP2 – tuseau 2010-05-07 08:31:03

回答

1

是您的机器在一个域?这可能是组策略搞乱了它。

在我的情况下,有安全指令禁用ASPNET帐户。

它导致了一个通用的服务不可用错误,需要一段时间才能弄清楚。

+0

是的,它在一个域上 - 我认为你是对的,这可能与此有关。谢谢 – tuseau 2010-05-07 08:36:19

1

我也看看服务器是否安装了思科安全代理(我认为这是名字)。我们遇到了类似的问题,无论我们通过什么方式获得许可,我们都无法将网络服务访问到卷影副本文件夹,结果证明思科安全代理拒绝访问该文件夹。

+0

谢谢 - 我们没有思科安全代理,但它可能是另一个安全应用程序是罪魁祸首。 – tuseau 2010-05-07 08:39:22

相关问题