views:

182

answers:

0

For the system.web/httpHandlers section of web.config I can use the "configSource" attribute to specify an external configuration file, like so:

<system.web>
     <httpHandlers configSource="App_Config\httpHandlers_iis6.config" />
</system.web>

This allows me to use the same set of handlers across all of my environments while only having to maintain them in one place, while still allowing things like appSettings to change from one web.config to the next.

Unfortunately, it appears that the same technique is not supported for the section pertaining to IIS7 handlers:

<system.webServer>
    <handlers configSource="App_Config\httpHandlers_iis7.config" /> <!-- not supported -->
</system.webServer>

Is there any way to separate my handlers configuration from the main web.config file for IIS7?