IIS Config Error – This configuration section cannot be used at this path
After deploying C# MVC 4 application to IIS 10 server my application is giving below error:
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”.
There are many reason for this error but I am sharing below steps which solved by problem:
1) Open IIS server and go the your application in “Connections” section on left side.
2) On clicking on application, in middle pan search for “Configuration Editior” under “Management”.
3) On configuration Editior select “system.webServer/handlers” from “Section” dropdown.
4) Select “ApplicationHost.Config…” from “From dropdown.
5) From “(Collection) Element” click on “unlock element”
Hope it will help someone!!!