views:

384

answers:

1

I have multiple websites that all have the same code, but different app settings. I want to place my app settings in a separate configuration file that is located in a virtual directory. This will allow me to have a single copy of all of the code shared across all of the sites with a different virtual directory for each site.

Unfortunately, when I try to configure this, IIS doesn't process the config file when it is in a virtual directory.

If you have a solution to this, I would appreciate your help.

A: 

Maybe using the machine.config file on your web server would be a suitable alternative? Otherwise you could create a web.config file in a global folder somewhere and open it using the WebConfigurationManager.OpenMappedWebConfiguration() method.

Mike C.