Jan
3
Written by:
Darren McLeod
Saturday, January 03, 2009 2:41 PM
In a website project you generally have a development environment, testing environment, and production environment. Each of these environments has different web.config settings. Unfortunately ASP.NET does not provide an elegant way of handling these so I did some research and found a couple of solutions that the community has come up with.
One solution is just one step up from just having a separate web.config for each environment. In this solution they use a little known “include” functionality that comes with ASP.NET. So you have one common web.config file and then one or more “include” files for the environment specific settings. A detailed description of this method can be found here:
Another solution uses some custom coding to add machine specific settings right in the web.config file. A detailed description of this method can be found here:
Darren
Tags: