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:
The specific issues we are having:
Our current thoughts on how we might approach this are:
Whichever way you go, I think it could be valuable to have the notion of a single "source of truth" for your configuration.
Duplication is fine, if you need to provide configuration to some components in their own specialized form.
But to retain your sanity I think you should try and aim to have one place where you set all the configuration pertaining to your application, and then a well-defined mechanism for translating that into entries inside Web.config, and any other config mechanism you have to support.
Depending on the level of skill of your support partners (whether or not they will break XML), I imagine you may also want to provide a GUI utility to let them twirl all the knobs in this "source of truth" configuration file, with "Apply" going and running transform/update code to make the necessary changes to Web.config & friends.
Then to manage your configuration for different sites/customers, you theoretically have around one configuration file to manage.
Note: In ASP.NET 4.0 a build-time configuration transform mechanism will be available (see http://blog.hmobius.com/post/2010/02/17/ASPNET-40-Part-4-Config-Transformation-Files.aspx), which may make this task easier. It appears you can use this with some hacks for non web projects (see http://philbolduc.blogspot.com/2010/03/using-config-transforms-outside-web.html).
However, if you need to make these changes at deployment time, you may be stuck with writing custom tools to do this, though it looks like the XDT transforms may be the way to go for you, given you want to be able to add/update/remove items.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With