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

后端 未结 6 1888
悲哀的现实
悲哀的现实 2021-02-20 17:53

I am getting the error:

Module  IIS Web Core
Notification    Unknown
Handler Not yet determined
Error Code  0x80070005
Config Error    Cannot read configuration          


        
6条回答
  •  一整个雨季
    2021-02-20 18:24

    I ran into this issue again today. This time, no amount of granting permissions worked (tried all the usual accounts, everybody, read-only, modify, full control).

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

    Eventually changed the owner from "Administrators" to myself, and things fell into place.

    I usually run Visual Studio at Admin level (using my own account) because I like to use the local IIS for hosting / debugging ASP.NET sites. Perhaps that caused new files to be owned by \Administrators, which in turn may have limited access to those files by the IIS or App Pool processes.

    My DefaultAppPool identity is set to load the user profile. I don't know at what point the session manager applies UAC / permissions drops and whether user profile loading has any influence on this. Food for thought...

提交回复
热议问题