I recently setup an ASP.Net 3.5 web application on a new Windows 2008 R2 server with IIS 7 and ran into a few issues. I will post about them all under the tag: “asp.net 3.5 with iis 7“.
After setting up the file system and creating the application, I tried to load the default document in a browser and got:
HTTP Error 500.19 – Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.
Module IIS Web Core Notification BeginRequest Handler Not yet determined Error Code 0x80070021 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”.
The solution was to make a change in the applicationHost.config file.
- Browse to “C:WindowsSystem32inetsrvconfig” (you will need administrator rights here)
- Open applicationHost.config
- Find the section that showed up in the “config source” part of the error message page. For me this has typically been “modules” or “handlers”
- 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 loaded up fine in my browser.