Categories
iis iis-10 iis-7 iis-8.5

Config Error: This configuration section cannot be used at this path

1968

I’ve encountered an error deploying a site to a server. When trying to load the home page, or access authentication on the new site in IIS, I get the error:

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”.

More detail can be found here, in Scenario 7 matches my hex error code.

The solution given on the linked site above is to set Allow for overrideModeDefault in the section mentioned in my error, in the applicationHost.config file. In my case, under Security in system.webServer. But if I look at the applicationHost.config on my local computer, where the site is properly deployed already, that section is set to Deny.

If this solution is correct, how is my local instance running just fine with the same web.config? According to my applicationHost.config, that section should be locked, but it’s not. I’d prefer to not change the applicationHost.config file, because there are many other sites running on that server. Is there another solution?

1

3668

+50

I had the same problem. Don’t remember where I found it on the web, but here is what I did:

  • Click “Start button”
  • in the search box, enter “Turn windows features on or off”
  • in the features window, Click: “Internet Information Services”
  • Click: “World Wide Web Services”
  • Click: “Application Development Features”
  • Check (enable) the features. I checked all but CGI.

btw, I’m using Windows 7. Many comments over the years have certified this works all the way up to Windows 10 and Server 2019, as well.

11

  • 7

    Awesome! Mine was missing .Net 4.8. Enabled it and started working. Thanks a million man.

    – ChiragMS

    Aug 11, 2020 at 4:14

  • 1

    On Windows 10 and this works for me. My project target .Net 4.8 but the IIS only has .Net 4.7, but it’s not an issue

    Aug 21, 2020 at 14:51

  • 10

    For Windows Server 2019, you have to activate these features from “Add Roles and Features” from the server manager.

    – GRosay

    Mar 3, 2021 at 7:17

  • 1

    Yes it works on Windows Server 2012R2 as well.

    Apr 27, 2021 at 22:43

  • 1

    worked for me (Windows 10, VS-2019). Thanks man

    – Deep Roy

    Aug 3, 2021 at 14:26

448

You could also use the IIS Manager to edit those settings.

Care of this Learn IIS article:

Using the Feature Delegation from the root of IIS:

Feature delegation icon in IIS Manager

You can then control each of machine-level read/write permissions, which will otherwise give you the overrideMode=”Deny” errors.

Example use of Feature Delegation

12

  • 23

    To continue this, what worked for me is to (note this solution is on my DEV box and NOT a Production system): -> Sort by Delegation -> Find all of the Read Only types -> Set them to Read/Write

    Jun 9, 2014 at 19:50


  • 2

    That fixed the error message I was getting in the IIS7 manager. More surprisingly is that it also fixed the HTTP 500 clients were receiving when attempting to access the website.

    Aug 13, 2014 at 14:39

  • 8

    There are two seemingly different solutions posted here both of which are required. The first being, install the “Application Server” and “Web Server” Support features. The second being, check the delegation settings and change the offending setting to Read/Write from read only. Important to NOTE: The offending config may not be available in the Delegation features unless the correct Support Features are installed. In my case, “Authentication – Anonymous” was the issue, and this delegation feature did not show up until I installed the Application Server feature.

    – maplemale

    Jul 13, 2015 at 17:25

  • 1

    This worked to me. in IIS 8.5 , Windows server 2012 R2

    Apr 17, 2017 at 11:58

  • 1

    The issue for me was in the authentication section, in IIS 10 in windows 10. This link has helped me. knowledgebase.progress.com/articles/Article/…

    – Ajith

    Jun 13, 2019 at 7:29


192

For Windows Server 2012 and IIS 8, the procedure is similar.

The Web Server (IIS) and Application Server should be installed, and you should also have the optional Web Server (IIS) Support under Application Server.

Windows Server 2012 and IIS 8 Requirements for MVC

2

  • 31

    Just to clarify, the “Web Server (IIS) Support” feature checkbox is not under the ‘Application Server’ node in the pic above. It will show after you perform several ‘next’ and pass the Server Roles and Features on the left nav bar and get to ‘Role Services’ (doesn’t appear in the pic above but will appear for you after several ‘next’). This drove me crazy 😛

    – thedrs

    Jun 10, 2014 at 16:57

  • 2

    for me the options only appeared after I first added the Application Server rule then restarted the Add Roles and Features Wizard

    – wonster

    Jul 20, 2015 at 1:22