Tonight I went to setup a new site on my local computer in IIS. The web site was a pretty simple Asp .Net MVC app so I didn’t anticipate running into any issues since I already had the MVC framework installed along with .net 3.5. So, the site was set up as an Application under my Default Web Site. I went to go it in the browser and bam, error:
Config 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".
And then to top it off:
I figured this was some sort of a config issue so after googling it, I found no end of sites talking about going into the ApplicationHost.config file (requiring admin access) and changing a value from Deny to Allow for the “handlers” section. Unfortunately, I did this and the error was the same. I frantically restarted the default web site, recycled app pools, restarted IIS, and got nothing. Out of ideas, I decided to look through the ApplicationHost.config file a bit more. That’s when I saw this line:
<location path="Default Web Site" overrideMode="Deny">
<system.webServer>
<handlers />
I changed the “Deny” here to “Allow” and refreshed my web site and everything was good to go.
Comments
AtomicInternet
I blame the schools