Tom Kidd Tom Kidd - 8 months ago 52
C# Question

Error Message: "Access to the path c:\windows\\framework\(version)\Temporary ASP.NET Files\(blah) is denied." - what causes this?

Every so often when I'm debugging, I get this message in nice brown text on an ASP.NET error page:

Access to the path
"c:\windows\\framework\(version)\Temporary ASP.NET Files\(blah)"
is denied.

I've never been able to figure out what causes it, what really fixes it, and why it happens.

Often times the path after the "Temporary ASP.NET Files" portion (the "(blah)") does not exist, so I'm not sure why it's looking there.

Sometimes an IISRESET fixes it, and sometimes it doesn't.

Sometimes an aspnet_regiis fixes it, and sometimes it doesn't.

Sometimes a reboot fixes it, and sometimes it doesn't.

For what it's worth I ran into this today with some .NET 1.1 code (yes, still maintaining some - hoping to upgrade it soon) and I'm not sure if I've ever seen it with .NET 2.0 and above.

Does anyone know what causes this and what should fix it? I assume it has multiple possible causes but I'm just curious if someone could shed some light on it.


It was my understanding this can be caused by anti-virus running on the machine and intermittently locking the files.