0

I have a web site using .NET 4 and ASP.NET MVC3 running in IIS 7.5. I get the following 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".

I found a solution here, however setting overrideModeDefault to Allow for both handlers and modules seems to have no effect on my site as I still get the 500.19 error. I tried restarting IIS and searching for other possible config files but could not find any. I'm out of ideas and every site I've looked at suggesting the above solution says to change it, save and you're done, so I'm at a loss on the problem. The only other thing I haven't done is restarted the server, but nothing has suggested this should be necessary.

1 Answer 1

1

A co-worker found a solution and posted it here.

I would recommend using appcmd.exe to allow overriding the different configuration sections. More info on that can be found at (http://learn.iis.net/page.aspx/114/getting-started-with-appcmdexe/).

To answer your question directly, you can globally unlock the config section using the following command.

%windir%\system32\inetsrv\appcmd.exe unlock config -section:path/to/section

If you only want to unlock the config section for a certain site, you can also pass in the site name.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .