IIS 8 ASP.Net Error “configuration section cannot be used…”

iis8logoWhen working with IIS 8 (or even 7 or 7.5), you may have run across this little gem / error: “This configuration section cannot be used at this path”

HTTP Error 500.19 – Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.
Module / Handler IIS Web Core
Notification BeginRequest
Handler Not yet determined

You’ll want to open the applicationhost.config located in: C:\Windows\System32\inetsrv\config

And now find the lines like this:

<section name="handlers" overrideModeDefault="Deny" />
<section name="modules" allowDefinition="MachineToApplication" overrideModeDefault="Deny" />

And change the Deny to Allow, like this:

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

Save the file, and you should be good!

IIS 8 ASP.Net Error “configuration section cannot be used…”