IIS "Access to the path 'C:\inetpub\wwwroot...' is denied."

When a website in IIS gives you the following yellow screen of death with "Access to the path 'C:\inetpub\wwwroot...' is denied." this means that it is a permission thing. The account running your application pool doesn’t have permission to access this path. This will usually happen when you run your website under a different application pool other than the DefaultAppPool. When a new application pool is created, a new virtual account is created in Windows and it is this account that doesn’t have permission.


To solve this issue:

  1. In Windows Explorer, right click on the folder you have your website files; in my case C:\inetpub\wwwroot\dnndev8.me\, and select Properties
  2. Go to tab “Security”
  3. Click “Edit”
  4. Click the “Add” button
  5. In the “Select Users or Group” window click “Locations” and select your local computer
  6. Then in the “Enter the object names to select” textbox write “IIS AppPool\dnndev8.me” without the double quotes. My app pool name was dnndev8.me so replace it with your own.


  7. Click “Check Names”. If everything is ok what you wrote will change like in the screenshot


  8. Click “OK” button to go back to the Permissions window
  9. Give “Modify” permission to the account you just added and click “OK” button


Now your site should be running just fine!

Note: This is specific to Windows 7 and IIS 7.

Comments

Popular posts from this blog

Convert Outlook EntryID to EwsID Exchange Web Services

Freeze panes in BO Webi report like Excel