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

后端 未结 6 2000
悲哀的现实
悲哀的现实 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...

    0 讨论(0)
  • 2021-02-20 18:31

    First, make sure IUSR has Read permission on the config file (which I believe you have done that)

    Then, change IIS authentication method to BasicAuthentication

    If still not working, probably the .config extension is not properly installed in IIS.

    Try all 3! Good luck!

    EDIT: Forget to ask you, what kind of appliation is it?

    0 讨论(0)
  • 2021-02-20 18:39

    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

    0 讨论(0)
  • 2021-02-20 18:39

    I just came across this and was unable to find applicationpoolidentity as an account in order to add it to the folder security. I changed the application pool identity from applicationpoolidentity to Local Service and the site ran fine.

    0 讨论(0)
  • 2021-02-20 18:44

    I was copying a live WordPress site to my local machine for editing/updating when this IIS error occurred. Changing permissions did nothing.

    In my case, simply deleting the web.config did the trick.

    0 讨论(0)
  • 2021-02-20 18:49

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

    The problem was caused because I shared some sites content inside C:\inetpub\wwwroot with other developers. This must have changed permissions and broke my IIS completely.

    0 讨论(0)
提交回复
热议问题