[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 173
  • Last Modified:

automate website feature changes to refelect development stages?

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!

Nellster
0
nellster1000
Asked:
nellster1000
1 Solution
 
tetorvikCommented:
Hi,

personally I wouldn't do too extensive solution at this point as VS2010 will solve that annoying issue.
The feature is called "Web.Config Transformation". See http://blogs.msdn.com/webdevtools/archive/2009/02/04/web-deployment-with-vs-2010-and-iis.aspx

Br,
Teemu
0
 
nellster1000Author Commented:
ta for the reply.. looks like that is just the ticket!

Many thanks!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now