0
votes

Okay, I realize there are many questions relating to this error, I have read several questions and answers without resolving my problem.

I have a MVC site that I'm trying to debug on local IIS web server. I check the option to use local IIS in the project properties and I've created a virtual directory in IIS.

The error I get in Visual Studio is:

Unable to start debugging on web server.

In IIS i try browse the site but get the error:

Cannot read configuration file due to insufficient permissions

Config File \?\C:\Users\Mike\Documents\Visual Studio 2010\Projects\MvcApplication1\MvcApplication1\web.config

I've set permissions for the pool identity on the web.config and whole project folder.

I've tried localsystem identity, no luck!

Please help me resolve this. I've spent several hours trying to fix this.

4

4 Answers

2
votes

I found that if granting read permission to IIS_IUSRS still does not help. You need to also check that the web.config file is not encrypted. You can see if the file name is green in Window Explorer, it means the file encrypted. You can also do right click at the file, select Properties… / General Tab / Advanced… Make sure the "Encrypt content to secure data" unchecked.

It works for me once I uncheck that Encrypt box.

0
votes

Maybe this will help. Look here, here and here
You also might have to grant ISS_IUSRS right to C:\Windows\Microsoft.NET\Framework64\v2.0.50727\config\machine.config and then do a iisreset

Edit: Do you have the right Application Pool Identities? Read more here

0
votes

For local development I've used pritty straightforward solution - just set IIS Application Pool to LocalSystem, set permissions for site folder (ISS_IUSRS - all) and it's worked for me

0
votes

I only ran into a different set of issues with IIS_IUSRS. So I just published the site under a whole different folder, off the root, and the issue went away!