'This configuration section cannot be used at this path - Windows 2016
Getting below error after migrating MVC application to Windows 2016. Roles & features look good to me, Roles & Features
This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault="Deny"), or set explicitly by a location tag with overrideMode="Deny" or the legacy allowOverride="false".
Any solution?
Solution 1:[1]
This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault="Deny"), or set explicitly by a location tag with overrideMode="Deny" or the legacy allowOverride="false".
As far as I know, this error means the config section is locked by the some other config.
Normally, the error message page's “config source” part will contain which section has been locked.
Then you could go to “C:\Windows\System32\inetsrv\config” (you will need administrator rights here) Open applicationHost.config to change the overrideModeDefault attribute from deny to Allow.
For example:
<section name="modules" allowDefinition="MachineToApplication" overrideModeDefault="Allow" />
Solution 2:[2]
1. Edit this file “C:\Windows\System32\inetsrv\config\applicationHost.config”
2. Replace this line:
<section name="ipSecurity" overrideModeDefault="Deny" />
with:
<section name="ipSecurity" overrideModeDefault="Allow" />
? This worked for me on Windows server 2022 ?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Brando Zhang |
| Solution 2 |
