Multiple Configuration Files

Sep 3, 2009 at 11:21 PM

Is there a way to use multiple configuration files.

I have a need for two separate configurations for my website. I set my ConfigurationProvider to XMLConfiguration Provider for both instances. I then specified two separate configuration files, one called Configuration.xml and the other PortfolioConfig.xml. When I view the first instance with a path to Configuration.xml, it works great. When I view the second instance with a path to PortfolioConfig.xml, it does not work properly. The second instance is obtaining it's configuration information from Configuration.xml.

Page 1:

<param name="initParams" value="ConfigurationProvider=XMLConfigurationProvider; Path=Configuration.xml,DataProvider=XmlDataProvider;Path=Data.xml" />

Page 2:

<param name="initParams" value="ConfigurationProvider=XMLConfigurationProvider; Path=PortfolioConfig.xml,DataProvider=XmlDataProvider;Path=PortfolioData.xml" />