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:
- In Windows Explorer, right click on the folder you have your website files; in my case C:\inetpub\wwwroot\dnndev8.me\, and select Properties
- Go to tab “Security”
- Click “Edit”
- Click the “Add” button
- In the “Select Users or Group” window click “Locations” and select your local computer
- 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.
- Click “Check Names”. If everything is ok what you wrote will change like in the screenshot
- Click “OK” button to go back to the Permissions window
- 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
Post a Comment