Click here to Skip to main content
15,903,362 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all

I have a requirement to add multiple .config files in a single application
so that I can pick one at the runtime, based on a value in the queryString
Posted

You can have multiple configs.
But you can add only one web.config file per folder in your application.
 
Share this answer
 
You can't have multiple web.config files for root folder, you need to create separate folder for each web.config file.

You might want to look following links:
One[^]

Two[^]

Hope these links prove to be helpful for you. :)
 
Share this answer
 
Web.config should be only one for each virtual directory. Even if you place multiple web.config in one folder, ConfigurationManager will only parse the file Web.config. Others you need to read it manually.

Have a look at these links to have multiple config file:
Include Multiple .Config Files in ASP.NET Web Application[^]
Using multiple config files in one application[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900