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"

IIS Configuration Editor

6) Right click on middle pan and save the changes.

IIS save Configuration

7) After saving applicationHost must be unlocked and your website should run fine.

Hope it will help someone!!!




Your feedbacks are most welcome..