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
<div id="details-left">
Module
CustomErrorModule
Notification
SendResponse
Handler
StaticFile
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 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:
jayashree_v_...
1 Post
Error in web.config file while publishing .NET application in IIS
Mar 04, 2013 07:50 PM|LINK
Hi,
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
<div id="details-left">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".
Rick Barber
571 Posts
Re: Error in web.config file while publishing .NET application in IIS
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:
http://www.iis.net/learn/get-started/planning-for-security/how-to-use-locking-in-iis-configuration
Please mark the replies as answers if they help or unmark if they don't.
OrcsWeb: Managed Windows Hosting Solutions
"Remarkable Service. Remarkable Support."