Solved

automate website feature changes to refelect development stages?

Posted on 2009-04-08
2
163 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
ASCX file or a newer alternative? 1 36
https://github.com/willowsystems/jSignature 11 52
Problem with SelectList in .NET MVC application 1 17
MailAddress in vb 4 15
Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …

803 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