93

I am attempting to run an application in IIS8 that has the following in the config:

<modules runAllManagedModulesForAllRequests="true" />

IIS8 is giving me an error that says...

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'm guessing by the error and a quick SO search that there is some higher level security setting that's preventing that line from being allowed. Any ideas?

4 Answers 4

170

I've solved the same problem by installing the window features "Internet Information Service/World Wide Web Service/Application Development/ASP.NET x.x" in the Control Panel of Windows8. If you want to setting on Windows Server 2012, the following link gives you hint. http://www.iis.net/learn/get-started/whats-new-in-iis-8/iis-80-using-aspnet-35-and-aspnet-45

hope that it works out.

5
  • 2
    This is exactly what it is... I just didn't have those featured turned on in Windows 8. Thanks so much for the answer! Feb 1, 2013 at 17:31
  • That really is a problem, that IIS8 considers such as error while trying to deploy.
    – Johnny_D
    Nov 20, 2013 at 7:06
  • 1
    Great ! Worked on Windows 8
    – Sanoop
    Sep 28, 2016 at 14:34
  • 1
    This is also the solution on Windows 10. Thanks a lot!
    – Yang You
    Feb 28, 2020 at 12:36
  • Also for me for .NET 4.8 on Windows Server 2016. The feature was entitled "ASP.NET 4.6" (rather than "ASP.NET 4.5", as shown in that link) but it did the job!
    – Dan Roberts
    Oct 19, 2022 at 13:37
22

For those of you running Windows Server 2012 the Application Development features are found at

[] Server Roles [] Web Server IIS [] Web Server [] Application Development [] ASP.NET x.x

When you select the .NET version it will ask if you want to add Extensions and other features. I just said yes, but you may be able to get away without installing those.

3

You can unlock the section via the IIS UI per https://serverfault.com/a/516921/137255

  1. Open IIS Manager
  2. Click the server name in the tree on the left
  3. Right hand pane, Management section, double click Configuration Editor
  4. At the top, choose the relevant section based on the offending item's XPath; i.e. system.webServer/modules for this example.
  5. Right hand pane, click Unlock Section
2

its hard to give a specific answer here, but the basics of it are that you need to look at the machine.config for the box you're running on. find the system.webServer node and look for the 3 tags/attributes its referencing in the error. chances are you'll find something that is marked as not overridable (allowOverride="false"), but i've not messed with windows 8/server 2012 yet, so i don't know what the machine.config looks like.

2
  • Interestingly, in C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config there is no system.webServer section, although that does sound like the answer Sep 19, 2012 at 2:55
  • Thank you. I added this (allowOverride="false") to C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config Results: <section name="system.webServer" type="System.Configuration.IgnoreSection, System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowOverride="false"/> Mar 18, 2021 at 18:11

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.