Can anyone suggest a good way to manage multiple web.config files?
For example, I have a development web.config I use on my localmachine named ‘localWeb.config’ and then one I use for production called ‘prodWeb.config’. I keep the .config extensions so no one can access them from the web server.
localWeb.config will for example have a connection string to a development database while prodWeb.config has one to the production database.
Currently, I am using a postbuild event that will copy the contents of localWeb.config or prodWeb.config to web.config. This works well but I was wondering if anyone knew of any better ways.
Check out the Web Deployment Tool: