Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Whenever I add a Handler Mapping for a website in IIS7 Manager it always adds the handler to the site's local web.config file.

Is there a way to tell the manager to only add the handler mapping to the site configuration in applicationHost.config, for example:

<location path="Test Site">
            <clear />
                path="*.php" verb="GET,HEAD,POST" 
            <-- Other handler mappings here -->

I know how to do this using appcmd using the /commit:apphost switch but it'd be nice to achieve this via the UI.

share|improve this question
up vote 4 down vote accepted

IIS Manager purposefully sets the setting at the lowest level that is allowed. Since you're allowed to have that set in the site's web.config, it will always apply it there.

IIS Manager itself does not give you a choice where to set it. The reason is that it would quickly become confusing and messy for the average administrator since a setting in applicationHost.config would be ignored if it's also set in web.config. So the cleanest way to ensure that there isn't confusion is to apply it at the lowest level allowed.

The solution (besides appcmd or editing applicationHost.config directly) is to use Configuration Editor from the IIS Admin pack (it's installed by default with IIS 7.5 on WS08 R2). That does allow you to choose where you want settings to be applied.

Actually, to be complete, although usually not a worthwhile option for handlers, you can turn off delegation for handlers for that site or the server. Then IIS Manager will set it in applicationHost.config.

share|improve this answer
Scott, thanks for the info. – Kev Oct 14 '09 at 13:50

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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