Access denied to your own ASP.NET application

Every have a bad day with your ASP.NET app? Ever get the yellow screen of death with this on it:

Access to the path "C:\WINNT\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\myapp\5607edd7\fc4d1071\hash.web" is denied.

If you go googling for the problem, you'll find a few suggestions, solutions, ideas, and rants. We had the same problem happen at our shop a few times in the same week. In fact, it got to the point where we (the users in the local Administrator group) couldn't even access the folders themselves.

After putting our proverbial minds to work, we did something fairly simple. We reclaimed ownership of the folders. You can do this in the security tab of the ASP.NET Temporary files directory.

  1. Right click and select "Properties"
  2. Select the "Security" tab
  3. Click on the "Advanced" button
  4. Select the "Owner" tab
  5. Select the owner (MACHINENAME\Administrators), check the "Replace owner on subcontainers and objects" and click OK

Voila. Problem gone. App working again. Everyone is happy.

4 Comments

  • I also encountered that and after googling i found a solution:

    Right Click on My Computer
    -> Select Manage
    -> under Services and Applications
    -> expand Indexing Service
    -> right click on System
    -> New
    -> Directory
    -> Browse the folder (C:\WINNT\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\myapp\5607edd7\fc4d1071) then click ok.

    Note: Stop and Play Index Service once the above step is done. Cheers!

  • it worked! thanks!

  • To stop getting this error, I had a user specified in the identity like and once the userName/password was removed the application would compile

  • It's working fine with me

Comments have been disabled for this content.