I have the following error occur whenever I try to access any page in my ASP.NET 2.0 application. This application was working fine and then this past Friday it just stopped working. I have spent almost 3 days searching in various forums and trying thier
suggestions, but nothing has worked.

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) +3591451
System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags hostingFlags) +222
[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) +3540923
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +69
System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +275
Version Information: Microsoft .NET Framework Version:2.0.50727.832; ASP.NET Version:2.0.50727.832

Check the permissions of the Network Service Account on the ASP.NET Temporary Files Folder as well as the C:/WINDOWS/TEMP folder. The Network Service Account has full control on both folders

Run aspnet_regiis -i and and aspnet_regiis -ga "NT AUTHORITY/NETWORK SERVICE"

Check the application pool to make sure the site was running under aspnet 2.0

Tried to check the group policy to make sure it wasn't resetting the rights on this folder, but I don't think this was the problem, because the folder had the correct rights the first time I checked it.

Made sure impersonation wasn't on for my website.

Excluded the temporary ASP.net file folder from indexing

Downloaded Process Monitor and used that to make sure that Network Service was really the account that was trying to access the temp folder (it was).

Tried temporarily giving everybody full access to that folder to check if that fixed it. (It didn't).

I'm starting to think that this might not be a folder permissions problem at all, but may be masking some other issue with the site. Does anyone have any ideas of other things I could try or has this happened to anyone else?

Thanks in advance!

directory createdirectory permissionsDirectory Security.NET 2.0Access to the Path<asp.net>Access to the path is denied

This system is still in development and is on one of our test servers. At this point we don't take regular backups of the server. Usually we only do this when the application goes into production. The day that the application stopped working, I know we
had a router problem in one of our data centers that affected many applications, but the router problem has since been fixed and the server and IIS have been restarted since then.

Are you suggesting I delete the parent folder of the ASP.NET Temporary Files folder? That folder contains all of the files for ASP.NET v2.0 so I haven't deleted it because I don't want to delete all the files that are contained there. I did check the parent
folder permissions however, and the Network Service account has full control on that folder too. In fact, the permissions of the ASP.NET Temp Files folder are inherited from it's parent.

Please make sure we grant the account full control on that folder and the Deny checkbox is not enabled. Since you can delete the content of that folder by current login identity, you can try to use impersonation to impersonate this account to see whether
it works.

to my web.config replacing the username and password with my account username and password. Did I do that right? It did not make a difference - I got the same error.

I went through the permissions in the link that you sent me and granted the Network Service account any permissions it didn't have, but still no change.

Lastly, I don't have access to disclude folders from the anti-virus monitoring software because it is controlled at an enterprise level. Since this application once worked and randomly stopped working though, I don't believe this is the problem.

The website hasn't worked in several weeks. I am getting that error every time I try to go to the site. It used to work on the server and then all of a sudden one day, I just started getting that error. I'm not aware of any changes that were made either
between the time it worked and when it didn't.

I tried the aspnet_regiis -i -enable command with no change. The .Net Framework on the server is version 2.0.50727

This error is really puzzling me because it really doesn't seem to be a permissions problem.

Is there a way I can check to make sure this service pack is not already installed? Our company blocks downloads from the Microsoft website because that is another thing they like to control on an enterprise wide level - they push updates to all of our
servers at one time and only after a testing period.