Config Error: This configuration section cannot be used at this path

后端 未结 30 2601
死守一世寂寞
死守一世寂寞 2020-11-22 07:01

I\'ve encountered an error deploying a site to a server. When trying to load the home page, or access authentication on the new site in IIS, I get the error:

30条回答
  •  独厮守ぢ
    2020-11-22 07:40

    I noticed one answer that was similar, but in my case I used the IIS Configured Editor to find the section I wanted to "unlock".

    Then I copied the path and used it in my automation to unlock it prior to changing the sections I wanted to edit.

    . "$($env:windir)\system32\inetsrv\appcmd" unlock config -section:system.webServer/security/authentication/windowsAuthentication
    . "$($env:windir)\system32\inetsrv\appcmd" unlock config -section:system.webServer/security/authentication/anonymousAuthentication
    

提交回复
热议问题