IIS (Internet Information Services) · Advanced IIS

Feature Delegation

Some settings are locked at server level so a site’s web.config can’t change them. Feature Delegation decides which ones.

Advanced 5 min Lesson 38 of 45Covers IIS 10 on Windows Server 2019/2022/2025 and Windows 10/11.
0/45 in IIS
On this page · 5 min · Advanced

Learning objectives#

  • Read the Feature Delegation page
  • Allow a section for one site
  • Lock a section for security
  • Fix error 500.19 for locked sections

Explanation#

applicationHost.config marks each section with overrideModeDefault Allow or Deny. Sections set to Deny (for example handlers, modules, and some security sections) cannot be changed in a site’s web.config.

Server node → Feature Delegation lists every feature with its delegation: Read/Write (web.config may change it), Read Only, or Not Delegated. Custom Site Delegation changes it for one site only.

If web.config sets a locked section, IIS returns HTTP Error 500.19 with “This configuration section cannot be used at this path. This happens when the section is locked at a parent level.” Unlock it for that site or move the setting to applicationHost.config.

Lock settings you never want a deployment to change, such as IP restrictions on an admin site.

Step-by-step screens#

Drawings of IIS Manager in IIS 10 (Windows Server 2019/2022, Windows 10/11). The red numbers match the numbered actions under each picture; names on your computer will differ.

Loading pictures…

Code example: Allow handlers for one site in applicationHost.config#

XMLapplicationHost.config Illustrative
<location path="Shop" overrideMode="Allow">
  <system.webServer>
    <handlers />
  </system.webServer>
</location>


<!-- Same with appcmd -->
<!-- appcmd.exe unlock config "Shop" -section:system.webServer/handlers -->
<!-- appcmd.exe lock config "Shop" -section:system.webServer/security/ipSecurity -->
Expected output
The Shop site’s web.config can now define its own handlers; the 500.19 error disappears. ipSecurity becomes locked so web.config can’t remove the IP rules.

This example is illustrative. Copy or download it and run it in your own environment; the expected output is shown above.

Step-by-step explanation#

  1. A location element targets one site.
  2. overrideMode="Allow" unlocks the listed sections for it.
  3. appcmd unlock/lock do the same from the command line.

Real-world use case#

After deploying an app that sets handlers in web.config, the site showed 500.19. Unlocking handlers for that site only fixed it without opening the setting to every site on the server.

Common mistakes#

Unlocking at server level

Unlocking for all sites lets any deployment change security-sensitive settings. Unlock per site.

Editing applicationHost.config with Notepad while IIS Manager is open

One overwrites the other. Use appcmd/PowerShell or close IIS Manager.

Best practices#

  • Unlock per site, not globally
  • Lock security settings you rely on
  • Back up config before changes
  • Read the 500.19 detail text

Remember this#

Deny = web.config can’t change it.

Feature Delegation page = the switchboard.

500.19 “locked at a parent level” = delegation.

Practice exercise#

Your task: Unlock the system.webServer/rewrite section for the Shop site with appcmd.

Show solution
PowerShell Illustrative
%windir%\system32\inetsrv\appcmd.exe unlock config "Shop" -section:system.webServer/rewrite

Mini quiz#

Feature Delegation quizMultiple choice Question 1 of 1

What causes “This configuration section cannot be used at this path”?

Score so far: 0/0

Want more? Practise all IIS MCQs · IIS interview questions

My notes#

Saved in this browser.

Progress is saved in this browser. Sign in to sync.