Remove inherited web.config values that are duplicates

  • Thread starter Thread starter Jesper Mortensen
  • Start date Start date
J

Jesper Mortensen

Hi

I'm running a web application at the root and other separate web applications
in sub directories, which means settings are inherited from the root
web.config to the sub web.configs.

Now I'd like to remove values set in the sub web.config that are the same as
the inherited value. This would make it easier to administrate the
web.configs. I've searched without finding anything useful. How could I go
about this? I thought about merging the web.configs to one big XML file and
do some XSLT. Does anyone know of code or utility that can do the job?
 
Hi

I'm running a web application at the root and other separate web applications
in sub directories, which means settings are inherited from the root
web.config to the sub web.configs.

Now I'd like to remove values set in the sub web.config that are the same as
the inherited value. This would make it easier to administrate the
web.configs. I've searched without finding anything useful. How could I go
about this? I thought about merging the web.configs to one big XML file and
do some XSLT. Does anyone know of code or utility that can do the job?

Hi

As an alternative to proliferating web.config files you can vary
settings in sub-folders from the root web.config with <location>
sections.

For example:

<location path="subFolder1">
<system.web>
<authorization>
<allow users="admin" />
<deny users="*" />
</authorization>
</system.web>
</location>

Which will restrict access to user admin only in subFolder1

HTH
 
Back
Top