Currently running ASP.NET 2.0 on the 3.x framework coding in VB.Net
Hi all, my current web development process encompasses three modes;
1.) the local development site
2.) the remote staging site
3.) the remote production site
When the mode changes there are a typical set of changes that I make to various parts of the site, these being the following but not for all modes;
1.) Connection string change in the web.config to connect to appropriate DB version
2.) "Compilation debug" setting change in web.config
3.) "Custom Errors" setting change in web.config
4.) Commenting out of Google Analytics scripts in "Master" files.
What I want to be able to achieve is to automate these settings based on the "mode" of the site. What I envisage is maybe an "<app key>" setting that would have a value of either "Local Dev", "Remote Staging" or "Remote Production" and would make a number of changes based on this value to the parts of the site mentioned above.
I have formulated some ideas for certain aspects such as the ConnectionString. Currently I have 3 seperate connection strings in the web.config and comment out the ones not required. Instead I though I could have them all uncommneted but include a class in the project that inserted the correct one in my DataSource controls and code, based on an "<App Key>" mode setting? Initially it seems like it would work but am unsure of process load and best practice with this approach.
Anyone have any ideas on the best or best practice approach in trying to accomplish this?
Many thanks in advance!