How do I manage application configuration in ASP.NET?
Posted
by GlennS
on Stack Overflow
See other posts from Stack Overflow
or by GlennS
Published on 2010-03-23T14:08:26Z
Indexed on
2010/03/23
14:13 UTC
Read the original article
Hit count: 477
I am having difficulty with managing configuration of an ASP.Net application to deploy for different clients. The sheer volume of different settings which need twiddling takes up large amounts of time, and the current configuration methods are too complicated to enable us to push this responsibility out to support partners.
Any suggestions for better methods to handle this or good sources of information to research?
How we do things at present:
- Various xml configuration files which are referenced in Web.Config, for example an AppSettings.xml.
- Configurations for specific sites are kept in duplicate configuration files.
- Text files containing lists of data specific to the site
- In some cases, manual one-off changes to the database
- C# configuration for Windsor IOC.
The specific issues we are having:
- Different sites with different features enabled, different external services we have to talk to and different business rules.
- Different deployment types (live, test, training)
- Configuration keys change across versions (get added, remove), meaning we have to update all the duplicate files
- We still need to be able to alter keys while the application is running
Our current thoughts on how we might approach this are:
- Move the configuration into dynamically compiled code (possibly Boo, Binsor or JavaScript)
- Have some form of diffing/merging configuration: combine a default config with a live/test/training config and a site-specific config
© Stack Overflow or respective owner