473,320 Members | 1,719 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Multiple customized versions of web.config

Hi.

I've got a standard setup with a web app (ASP.NET 2.0) that I develop on my
machine, deploy to a QA server for testing, and then on to a PROD
environment. To facilitate the deployment process, I am utilizing our SCM
tool and things are working just fine. I make a change on my machine, commit
it, and update the QA machine and the change is immediately visible in the
web app there.

The irritating thing is that I often make changes to web.config. There are
over a dozen configuration differences between my development version and
those running on the QA and PROD servers (e.g. databases, membership
providers, etc.). I'm looking for a way to extract those changes out of the
file so that there can be a separate version in all 3 environments. Any ideas?

Thanks
Dec 30 '05 #1
5 1582
The Web Deploymnet Project
(http://msdn.microsoft.com/asp.net/re...p/default.aspx)
has a feature that allows sections of a web.config to be swapped out...this
might be what you are looking for.

you can also do it using hte file="blah.config" or whatever, take a look at:
http://odetocode.com/Articles/345.aspx and search for the section "Multiple
File Configuration"

Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/
http://openmymind.net/redirector.aspx?documentId=51 - Learn about AJAX!

"Mike Kelly" <Mi*******@community.nospam> wrote in message
news:87**********************************@microsof t.com...
Hi.

I've got a standard setup with a web app (ASP.NET 2.0) that I develop on
my
machine, deploy to a QA server for testing, and then on to a PROD
environment. To facilitate the deployment process, I am utilizing our SCM
tool and things are working just fine. I make a change on my machine,
commit
it, and update the QA machine and the change is immediately visible in the
web app there.

The irritating thing is that I often make changes to web.config. There are
over a dozen configuration differences between my development version and
those running on the QA and PROD servers (e.g. databases, membership
providers, etc.). I'm looking for a way to extract those changes out of
the
file so that there can be a separate version in all 3 environments. Any
ideas?

Thanks

Dec 30 '05 #2
Consider putting those settings in a higher level web.config file, such as
at the site level or the root web.config/machine.config files. Settings in
higher level .config files are inherited by your ASP.NET application.

-Brock
DevelopMentor
http://staff.develop.com/ballen
Hi.

I've got a standard setup with a web app (ASP.NET 2.0) that I develop
on my machine, deploy to a QA server for testing, and then on to a
PROD environment. To facilitate the deployment process, I am utilizing
our SCM tool and things are working just fine. I make a change on my
machine, commit it, and update the QA machine and the change is
immediately visible in the web app there.

The irritating thing is that I often make changes to web.config. There
are over a dozen configuration differences between my development
version and those running on the QA and PROD servers (e.g. databases,
membership providers, etc.). I'm looking for a way to extract those
changes out of the file so that there can be a separate version in all
3 environments. Any ideas?

Thanks

Dec 30 '05 #3
Excellent. Thanks Karl.

The <AppSettings> "file" attribute appeals to me. I can see it will work for
a lot of my programming, like connection strings. But, how can I use it for
the declarative stuff, like membership and role management? For example,
SqlMembershipProvider needs a connectionStringName in web.config that points
to an entry in <connectionStrings>. If I put my connection strings into
<AppSettings> (which I want to), how can <membership> get hold of it?

"Karl Seguin" wrote:
The Web Deploymnet Project
(http://msdn.microsoft.com/asp.net/re...p/default.aspx)
has a feature that allows sections of a web.config to be swapped out...this
might be what you are looking for.

you can also do it using hte file="blah.config" or whatever, take a look at:
http://odetocode.com/Articles/345.aspx and search for the section "Multiple
File Configuration"

Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/
http://openmymind.net/redirector.aspx?documentId=51 - Learn about AJAX!

"Mike Kelly" <Mi*******@community.nospam> wrote in message
news:87**********************************@microsof t.com...
Hi.

I've got a standard setup with a web app (ASP.NET 2.0) that I develop on
my
machine, deploy to a QA server for testing, and then on to a PROD
environment. To facilitate the deployment process, I am utilizing our SCM
tool and things are working just fine. I make a change on my machine,
commit
it, and update the QA machine and the change is immediately visible in the
web app there.

The irritating thing is that I often make changes to web.config. There are
over a dozen configuration differences between my development version and
those running on the QA and PROD servers (e.g. databases, membership
providers, etc.). I'm looking for a way to extract those changes out of
the
file so that there can be a separate version in all 3 environments. Any
ideas?

Thanks


Jan 3 '06 #4
Why can't you simply use a File="blah.config" in the connectionStrings
section?

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
http://openmymind.net/redirector.aspx?documentId=51 - Learn about AJAX!

"Mike Kelly" <Mi*******@community.nospam> wrote in message
news:4E**********************************@microsof t.com...
Excellent. Thanks Karl.

The <AppSettings> "file" attribute appeals to me. I can see it will work
for
a lot of my programming, like connection strings. But, how can I use it
for
the declarative stuff, like membership and role management? For example,
SqlMembershipProvider needs a connectionStringName in web.config that
points
to an entry in <connectionStrings>. If I put my connection strings into
<AppSettings> (which I want to), how can <membership> get hold of it?

"Karl Seguin" wrote:
The Web Deploymnet Project
(http://msdn.microsoft.com/asp.net/re...p/default.aspx)
has a feature that allows sections of a web.config to be swapped
out...this
might be what you are looking for.

you can also do it using hte file="blah.config" or whatever, take a look
at:
http://odetocode.com/Articles/345.aspx and search for the section
"Multiple
File Configuration"

Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/
http://openmymind.net/redirector.aspx?documentId=51 - Learn about AJAX!

"Mike Kelly" <Mi*******@community.nospam> wrote in message
news:87**********************************@microsof t.com...
> Hi.
>
> I've got a standard setup with a web app (ASP.NET 2.0) that I develop
> on
> my
> machine, deploy to a QA server for testing, and then on to a PROD
> environment. To facilitate the deployment process, I am utilizing our
> SCM
> tool and things are working just fine. I make a change on my machine,
> commit
> it, and update the QA machine and the change is immediately visible in
> the
> web app there.
>
> The irritating thing is that I often make changes to web.config. There
> are
> over a dozen configuration differences between my development version
> and
> those running on the QA and PROD servers (e.g. databases, membership
> providers, etc.). I'm looking for a way to extract those changes out of
> the
> file so that there can be a separate version in all 3 environments. Any
> ideas?
>
> Thanks


Jan 3 '06 #5
Because, and I quote from MSDN "This functionality is limited to the
appSettings attribute.". However, "In the .NET Framework version 2.0, you can
now include configuration settings in a separate file for all configuration
elements that support the configSource attribute". This I have done in the
connectionStrings section with success.

Thanks again.

"Karl Seguin" wrote:
Why can't you simply use a File="blah.config" in the connectionStrings
section?

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
http://openmymind.net/redirector.aspx?documentId=51 - Learn about AJAX!

"Mike Kelly" <Mi*******@community.nospam> wrote in message
news:4E**********************************@microsof t.com...
Excellent. Thanks Karl.

The <AppSettings> "file" attribute appeals to me. I can see it will work
for
a lot of my programming, like connection strings. But, how can I use it
for
the declarative stuff, like membership and role management? For example,
SqlMembershipProvider needs a connectionStringName in web.config that
points
to an entry in <connectionStrings>. If I put my connection strings into
<AppSettings> (which I want to), how can <membership> get hold of it?

"Karl Seguin" wrote:
The Web Deploymnet Project
(http://msdn.microsoft.com/asp.net/re...p/default.aspx)
has a feature that allows sections of a web.config to be swapped
out...this
might be what you are looking for.

you can also do it using hte file="blah.config" or whatever, take a look
at:
http://odetocode.com/Articles/345.aspx and search for the section
"Multiple
File Configuration"

Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/
http://openmymind.net/redirector.aspx?documentId=51 - Learn about AJAX!

"Mike Kelly" <Mi*******@community.nospam> wrote in message
news:87**********************************@microsof t.com...
> Hi.
>
> I've got a standard setup with a web app (ASP.NET 2.0) that I develop
> on
> my
> machine, deploy to a QA server for testing, and then on to a PROD
> environment. To facilitate the deployment process, I am utilizing our
> SCM
> tool and things are working just fine. I make a change on my machine,
> commit
> it, and update the QA machine and the change is immediately visible in
> the
> web app there.
>
> The irritating thing is that I often make changes to web.config. There
> are
> over a dozen configuration differences between my development version
> and
> those running on the QA and PROD servers (e.g. databases, membership
> providers, etc.). I'm looking for a way to extract those changes out of
> the
> file so that there can be a separate version in all 3 environments. Any
> ideas?
>
> Thanks


Jan 3 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Sammy | last post by:
On a Windows 2003 Server machine that has multiple IIS web sites, how does one control which web site the new web application gets created under? Thank you, Sammy
9
by: Graham | last post by:
I have been having some fun learning and using the new Controls and methods in .Net 2.0 which will make my life in the future easier and faster. Specifically the new databinding practises and...
3
by: Assembly file locked | last post by:
I'm trying to put a SQL statement in a web.config file. But I'd like to have a customized column name as I normally do in ORACLE: e.g. select reg_date "Registration" from patient But when I...
10
by: John | last post by:
I currently have a Windows Service that runs Transactions that are very Processor/Memory Intensive. I have a requirement to deploy multiple instances of the Web service on the Same server. Each...
2
by: Jon | last post by:
Is it possible to have a single site directory with all the aspx files and the bin directory, then have several other directories that hold customized images and web.config file for each customer?...
1
by: Achim Domma | last post by:
Hi, I have an asp.net application which can be configured via web.config. I had to setup multiple versions for multiple customers, so I made copies of the application folder and created virtual...
2
by: jeff | last post by:
I have an application that can either connect to an access database or a SQL Server database. I have 2 assemblies both implement the same interface for describing the data access methods for the...
1
by: John | last post by:
Hi We need to update machine.config for .net 2.0 on multiple pcs on a network. Most machines would potentially have other versions of .net installed too. Is there an easy/quick way to do this...
10
by: Scott Townsend | last post by:
So I'm trying to Write a Backend to something and in testing I decided to create a generic front end app that can simulate the passed in Data. So I have 2 projects in my solution, though I'm...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.