IIS 7 & IIS 8
Error in web.config file while publishing .NET application in IIS
Last post Mar 04, 2013 08:29 PM by Rick Barber
Mar 04, 2013 07:50 PM|LINK
I am trying to publish a c#.NET application on windows server 2008 on IIS 7.5. After configuring the site on IIS, when I try browsing it from the server, I get the following error: It shows error in my web.config file.
Detailed Error Information
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".
65: <modules runAllManagedModulesForAllRequests="true" /> 66: <httpErrors> 67: <!--<remove statusCode="400" subStatusCode="-1"/>
Can anyone please tell me how to overcome this error?
Mar 04, 2013 08:29 PM|LINK
The applicationHost.config is not allowing you to override something you are trying to from your web.config file. If you administer the server, you can find the appropriate line in the applicationhost.config and set it to overrideMode="Allow".
You may also find that attributes are locked for a particular section. Here is some documentation on that: