Solved

automate website feature changes to refelect development stages?

Posted on 2009-04-08
2
162 Views
Last Modified: 2013-11-08
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
Comment
Question by:nellster1000
2 Comments
 
LVL 9

Accepted Solution

by:
tetorvik earned 500 total points
ID: 24095307
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
 

Author Closing Comment

by:nellster1000
ID: 31567917
ta for the reply.. looks like that is just the ticket!

Many thanks!
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now