21

I get the error

Access to the path "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\cbnonreg\fc933fca\bbf91eea" is denied.

whenever I try to access my newly deployed site.
I looked at the path and discovered that /cbnonreg\fc933fca\bbf91eea does not exist.
please what can i do?

oers
  • 18,436
  • 13
  • 66
  • 75
  • One other point: make sure your app is actually supposed to be using v1.1 of the framework. If not, go into IIS and switch it to 2.0. – Michael Haren Dec 24 '08 at 16:45
  • I get this in my IDE before ever deploying anything... :( –  Dec 05 '12 at 15:05

11 Answers11

19

I got this error because I had turned on all "Common Language Runtime Exceptions" in the "Exception Settings" window of Visual Studio.

This must be one of the exceptions that fires as part of the normal flow of ASP.NET. If that's your problem (or if you don't know what the "Exception Settings" window does and you want to reset it to default) you should probably open the "Exception Settings" window and click the "Restore the list to the default settings" button at the top, or at least uncheck the exceptions you don't want the debugger to break on.

Jesse Hufstetler
  • 583
  • 7
  • 13
  • Resetting the exception settings worked for me, however the error did not show in all the solution I work on but only one of them, not sure what why as the area all similar web applications. – JayJay Feb 16 '21 at 22:29
14

This sounds like a permissions problem. Make sure that the ASPNET account has full access to the Temporary ASP.NET Files folder. If your problems persist, you could also try running The 'aspnet_regiis -i' command to re-install the framework, which should also reset file permissions.

Failing that, you could try using Process Monitor and filtering to the aspnet_wp.exe process to check what the process is trying to do, and update file permissions accordingly.

Mun
  • 14,098
  • 11
  • 59
  • 83
  • 4
    +1 for aspnet_regiis -i -- which usually fixes this issue for me. – Michael Haren Dec 24 '08 at 16:43
  • Weird, but this fixed things for me, too. I was seeing the problem generated using VS 2015 with iis express to debug a web application. The problem seemed to start for no real reason, and multiple reboots and resets of services didn't seem to fix things. – Roger Hill Jan 28 '16 at 02:20
  • "running the 'aspnet_regiis -i' command -- where? I tried opening up a command prompt, and it had no idea what I was talking about. So apparently that wasn't it. – William Jockusch Feb 20 '16 at 15:48
  • Location of the tool on each OS: https://msdn.microsoft.com/en-us/library/k6h9cz8h.aspx#Anchor_3 – Demonslay335 Apr 13 '16 at 18:19
14

In my case the error was followed by further exceptions if I had continued e.g. "mscorlib.dll not loaded". Based on this I found the working solution here: https://stackoverflow.com/a/27446877.

"Goto Tools, Options, Debugging, General, Enable Just My Code".

Root cause analysis: I realized that I attempted to test Release config under IIS Express (no debugging then of course) after prior attempts on Debug config. I was also playing with Web.config transform for Release. VS asked me to disable Just My Code on app launch. When I wanted to turn back to Debug, I started to receive referred errors. None of solution proposals from this thread were successful.

6

On Windows 8 you get this error

Microsoft (R) ASP.NET RegIIS version 4.0.30319.17929
Administration utility to install and uninstall ASP.NET on the local machine.
Copyright (C) Microsoft Corporation.  All rights reserved.
Start installing ASP.NET (4.0.30319.17929).
This option is not supported on this version of the operating system.  Administr
ators should instead install/uninstall ASP.NET 4.5 with IIS8 using the "Turn Win
dows Features On/Off" dialog,  the Server Manager management tool, or the dism.e
xe command line tool.  For more details please see http://go.microsoft.com/fwlin
k/?LinkID=216771.
Finished installing ASP.NET (4.0.30319.17929).

To fix the error from above (Windows 8) run this command:

dism /online /enable-feature /featurename:IIS-ASPNET45
3

This happens from time to time. Try restart your computer and delete everything under temporary ASP.net files folder.

Ken Yao
  • 1,506
  • 1
  • 13
  • 24
1

I solved the problem by deleting my local workspace and performing a Get from TFS.

Things that didn't work: running VS as admin, restarting VS, killing the built-in ASP.NET IIS dev server program, doing a clean and rebuild, rebooting computer.

Tim Partridge
  • 3,365
  • 1
  • 42
  • 52
  • Went into the TFS root directory for the solution and deleted the ".vs" folder completely, then ran VS under Administrator, no other steps were necessary. VS 2015 – John Maloney Nov 15 '17 at 17:49
1

I solved this problem by assigning full control to IIS_IUSRS on ASP.Net Temporary files folder.

1

Start Command Prompt in Non-Administrator mode and the error will go away. No need to fiddle with permission on Windows 7.

TheTechGuy
  • 16,560
  • 16
  • 115
  • 136
  • This is what did it for me. I was prompted to login with my credentials when the application ran, but then I was able to access everything just fine. – yougotiger Sep 07 '16 at 23:40
1

It looks like your web app had a hiccup when the new version was deployed. This happens from time to time. I typically try the following items to resolve the issue:

  1. Open and resave the web.config file on the server. A lot of times this will cause a refresh of the assembly and fix your issue.

  2. Delete the "cbnonreg" folder. This will force a refresh of the assembly and fix the issue.

  3. Restart IIS. This flushes out all temporary files and gives you a fresh start of everything.

Test these issues out one at a time to see if they resolve your issue. They are in the order of "least invasive" so that other applications on the server are not affected. You may into "permission denied" errors when performing issue #2 if some process is still trying to hold on to the files.

Hope this helps!

Dillie-O
  • 29,277
  • 14
  • 101
  • 140
  • YES! Happened while debugging locally, re-saving my web.config fixed the issue. (restarting did not work, nor did iisreset) – mike Nov 14 '15 at 22:06
0

This issue is getting caused by wrong permissions on one of the temporary folder located in C:\windows\Microsoft.Net\Framework or C:\windows\Microsoft.Net\Framework64.

I guess there are some Windows Updates to blame for this. After giving my user full access to the folder C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files the exception was gone!

Matthias Güntert
  • 4,013
  • 6
  • 41
  • 89
0

If you hit this error while trying to debug a app in visual studio, try running visual studio as an administrator. It will elevate the perms used and might solve the issue.

Roger Hill
  • 3,677
  • 1
  • 34
  • 38