views:

44

answers:

3

We have a large multi tenanted website which requires thousands of lines of web.config to support it. As the system grows we are finding it more and more difficult to manage this configuration file.

The system currently in place uses XSLT to generate the config but this solution seems to involve a lot of duplicated code (we have 12 deployment environments).

I am leaning towards putting the configuration data in the db so we can be sure that it's deployed with the application and that our release notes don't require the IT guys messing around with XML

What are better solutions we could use?

+4  A: 

I have to agree with you that just putting the configuration in the database might be your best bet.

jaltiere
A: 

You could use a SqlLite or SQL Express db that you package with the source code. Put it in the app_data folder.

Andrew Lewis
A: 

I prefer to use XML files myself, they're easy to edit, and it's even simpler with LINQ to XML. Similar to what Andrew said, you can put the XML config file in the App_Data folder.

Coding Gorilla