Wednesday, January 7, 2009

HTTP Error 500.19: "This configuration section cannot be used at this path."

Occasionally, when setting up a new Vista box with IIS 7 and ASP.NET, I'll encounter this error for one application or another.


Simply Googling the generic header "500.19 Internal Server Error" turns up too much unrelated information.  You have to look a little further down and see the little message about:
"This configuration section cannot be used at this path.  This happens when the section is locked at a parent level.

Application-in-Site


Once you've noticed this key piece of information, the steps to fixing it are simple and few:

  1. Examine the source to figure out which section has an override lock on it.  In my case, this was
    requestFiltering
    .
  2. Locate your applicationHost.config file.  This is generally located at %SystemRoot%/system32/inetserv/config/applicationHost.config.
  3. Within applicationHost.config, find the override section from step 1 and change it's overrideModeDefault to "Allow".

Application-in-Application


If your application is in a directory beneath another IIS application, debugging this error can become a little more tricky since there are multiple places the section could have been locked.  You should still begin by checking the applicationHost.config as the most likely place, but failing there, look through any other web.configs above your application.

No comments: