Saqib Nasri
Saqib Nasri

Reputation: 11

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?

Upvotes: 1

Views: 15910

Answers (2)

Ahmad Hamdy Hamdeen
Ahmad Hamdy Hamdeen

Reputation: 556

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 ✔

Upvotes: 0

Brando Zhang
Brando Zhang

Reputation: 27962

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" />

Upvotes: 3

Related Questions