Web.Config - Unable to read configuration file due to insufficient permissions

I get an error message:

Module IIS Web Core Notification Unknown Handler Not yet determined Error Code 0x80070005 Config Error Cannot read configuration file due to insufficient permissions Config File \\?\C:\inetpub\wwwroot\web.config 

The file itself has full permissions for IUSR. IIS runs the application pool in ApplicationPoolIdentity. I made a file monitor in a file and I see the following:

 9:04:43.8035456 AM w3wp.exe 8104 CreateFile C:\inetpub\wwwroot\Web.config ACCESS DENIED Desired Access: Generic Read, Disposition: Open, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: N, ShareMode: Read, AllocationSize: n/a 

Not sure why I get this error ... Any ideas?

+7
source share
6 answers

Try to provide read / write access to these accounts in the root folder of your web application and all files / signatures inside:

NETWORK, NETWORK SERVICE and, of course, IIS_IUSRS

+9
source

First, make sure that the IUSR has read permission in the configuration file (which I believe you did)

Then change the IIS authentication method to BasicAuthentication

If it still does not work, the .config extension may not be installed correctly in IIS.

Try all 3! Good luck

EDIT: Remember to ask you what this app is?

0
source

I just stumbled upon this and could not find applicationpoolidentity as an account to add it to the security folder. I changed the application pool identifier from applicationpoolidentity to Local Service, and the site went fine.

0
source

I copied a live WordPress site to my local computer to edit / update when this IIS error occurs. Changing permissions did nothing.

In my case, just removing web.config did the trick.

0
source

I found that adding mymachine / USERS with full permissions to C: \ inetpub \ wwwroot fixes the problem.

The problem was caused by the fact that I shared some content sites inside C: \ inetpub \ wwwroot with other developers. This was supposed to change permissions and completely break IIS.

0
source

Today I ran into this problem. This time, no permissions were granted to grant rights (all regular accounts, everything, read-only, changes, full control).

Closed processes, IIS restart, full reboot. No results.

In the end, he changed the owner from the "Administrators" to himself, and everything fell into place.

I usually run Visual Studio at the administrator level (using my own account) because I like to use local IIS to host / debug ASP.NET sites. Perhaps this caused the use of new files \ by Administrators, who, in turn, may have limited access to these files using the IIS or App Pool processes.

My DefaultAppPool ID is set to load the user profile. I do not know at what point the session manager applies the UAC / permission restrictions and whether loading the user profile affects this. Food for thought...

0
source

All Articles