Remove inherited web.config values that are duplicates

  • Thread starter Jesper Mortensen
  • 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?
 
S

Stan

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top