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

Sugitime picture Sugitime · Oct 4, 2012 · Viewed 40.3k times · Source

I am getting the error:

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 is running its app pool under ApplicationPoolIdentity. I did a file monitor on the file, and I see this:

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

No idea why I am getting this error... Any ideas?

Answer

Lawrence Johnson picture Lawrence Johnson · Oct 5, 2012

Try giving read/write access to these accounts to the root folder of your Web application and all files/subs within:

NETWORK, NETWORK SERVICE, and of course IIS_IUSRS