Config Error: This configuration section cannot be used at this path if we run VC3 in IIS

If you are trying to load the home page, or access authentication on the new site in IIS and get the 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”.

To fix it:
Browse to “C:\Windows\System32\inetsrv\config” (you will need administrator rights here) Open applicationHost.config

Note : In IISExpress and Visual Studio 2015 the applicationHost.config is stored in $(solutionDir).vs\config\applicationhost.config

Find the section that showed up in the “config source” part of the error message page. Typically “modules”.

Change the overrideModeDefault attribute to be Allow.

So the whole line now looks like:

<section name="modules" allowDefinition="MachineToApplication" overrideModeDefault="Allow" />

After saving the file, the page should be loaded up fine in the browser.

1 Like