We have an IIS 7.5 (not using ASP) with the following sites:
Site A
Site B
Site C
Site D
Site E
Site B
, Site C
and Site D
belong to a centralized application that uses the same web.config
. While the IIS allows us to use a web.confg for all of them plus an inherited web.config for each site, there does not seem to be an option to group sites to restrict this global inheritance.
To illustrate the problem, I will call the web.config after their content:
Site A
uses web.config "company-website" in/www/static/site_A/web.config
Site B
uses web.config "central-cms" in/www/cms/site_B/web.config
Site C
uses web.config "central-cms" in/www/cms/site_C/web.config
Site D
uses web.config "central-cms" in/www/cms/site_D/web.config
Site E
uses web.config "community-board" in/www/boards/site_E/web.config
As you can see, we have 5 physical web.config files although 3 of them (B, C, D) contain the same content.
We want Site B, C and D to share a single web.config file, but still want Site A and E to use their own web.config without having to negate inheritance.
Possible structure:
/www/static/site_A/web.config
(no inheritance)/www/cms/web.config
(base inheritance)/www/cms/site_B/web.config
(+ inheritance)/www/cms/site_C/web.config
(+ inheritance)/www/cms/site_D/web.config
(+ inheritance)
/www/boards/site_E/web.config
(no inheritance)
Note: All web.config files declare various rewrite rules and directives for <system.webServer>
.