473,322 Members | 1,345 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,322 software developers and data experts.

overload several config files?

Hi

I am building a dotnet 1.1 app, in VB.net ...

I would like to have several config files corresponding to multiple
envirronment (Database, local Machine, Application, User...) and overloads
each, in order to have, by the way, one config.

So I would like to load a config file (app.config) at startup (as usual),
then overload this file with a new file (came from SQL for exemple), then
overload with a second file.....etc....

What do you think about that? is it possible?

Do i must access to each file manually (with xml methods) ? read them and
then construct one config file, and then load it?
Thanks!!!!!!
bye
syl


Jul 21 '05 #1
3 2269
Hi,

I have tried and successfully loaded diffrent config files based on diffrent
business condition. Don't know it is the optimised solution:

Here is the code in C#

System.Configuration.ConfigXmlDocument doc = new
System.Configuration.ConfigXmlDocument();
doc.Load ("app.config");

I would convert the same in vb.net for you:

Dim doc as new System.Configuration.ConfigXmlDocument()
doc.load(app.config)

Then you have to access each node and attribute manually.

Best Regards,

Piyush Thakuria
"lobrys" wrote:
Hi

I am building a dotnet 1.1 app, in VB.net ...

I would like to have several config files corresponding to multiple
envirronment (Database, local Machine, Application, User...) and overloads
each, in order to have, by the way, one config.

So I would like to load a config file (app.config) at startup (as usual),
then overload this file with a new file (came from SQL for exemple), then
overload with a second file.....etc....

What do you think about that? is it possible?

Do i must access to each file manually (with xml methods) ? read them and
then construct one config file, and then load it?
Thanks!!!!!!
bye
syl


Jul 21 '05 #2
Hello

Thanks for your response Piyush!

I dont understand your answer.....
OK for reading file, but attribute manually to what?

Thanks
bye!
syl


"Piyush Thakuria" <pi*************@wipro.com.donotspam> a écrit dans le
message de news: 7B**********************************@microsoft.com...
Hi,

I have tried and successfully loaded diffrent config files based on
diffrent
business condition. Don't know it is the optimised solution:

Here is the code in C#

System.Configuration.ConfigXmlDocument doc = new
System.Configuration.ConfigXmlDocument();
doc.Load ("app.config");

I would convert the same in vb.net for you:

Dim doc as new System.Configuration.ConfigXmlDocument()
doc.load(app.config)

Then you have to access each node and attribute manually.

Best Regards,

Piyush Thakuria
"lobrys" wrote:
Hi

I am building a dotnet 1.1 app, in VB.net ...

I would like to have several config files corresponding to multiple
envirronment (Database, local Machine, Application, User...) and
overloads
each, in order to have, by the way, one config.

So I would like to load a config file (app.config) at startup (as usual),
then overload this file with a new file (came from SQL for exemple), then
overload with a second file.....etc....

What do you think about that? is it possible?

Do i must access to each file manually (with xml methods) ? read them and
then construct one config file, and then load it?
Thanks!!!!!!
bye
syl


Jul 21 '05 #3
We do something similar via a dll that runs as a step in our install
packages.

We create a set of configuration files (Dev, Test, QA, Production, etc.) and
then add a extra dialog to the installer that allows the User / Install to
pick the environment to which the application is being installed. Based upon
their selection, a conditional variable is set that the dll (which is invoked
as a Custom Action) uses to replace the Web.Config file in the project with
the particular <Environment.config> file.

So far it works great for us to be able to deliver a single install package
that can install our application to multiple environments based upon which
one the User / Installer selects from that additional dialog box (added via
Add Dialog).

SwamiDave

"lobrys" wrote:
Hello

Thanks for your response Piyush!

I dont understand your answer.....
OK for reading file, but attribute manually to what?

Thanks
bye!
syl


"Piyush Thakuria" <pi*************@wipro.com.donotspam> a écrit dans le
message de news: 7B**********************************@microsoft.com...
Hi,

I have tried and successfully loaded diffrent config files based on
diffrent
business condition. Don't know it is the optimised solution:

Here is the code in C#

System.Configuration.ConfigXmlDocument doc = new
System.Configuration.ConfigXmlDocument();
doc.Load ("app.config");

I would convert the same in vb.net for you:

Dim doc as new System.Configuration.ConfigXmlDocument()
doc.load(app.config)

Then you have to access each node and attribute manually.

Best Regards,

Piyush Thakuria
"lobrys" wrote:
Hi

I am building a dotnet 1.1 app, in VB.net ...

I would like to have several config files corresponding to multiple
envirronment (Database, local Machine, Application, User...) and
overloads
each, in order to have, by the way, one config.

So I would like to load a config file (app.config) at startup (as usual),
then overload this file with a new file (came from SQL for exemple), then
overload with a second file.....etc....

What do you think about that? is it possible?

Do i must access to each file manually (with xml methods) ? read them and
then construct one config file, and then load it?
Thanks!!!!!!
bye
syl



Jul 21 '05 #4

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

Similar topics

4
by: Fuzzyman | last post by:
There have been a couple of config file 'systems' announced recently, that focus on building more powerful and complex configuration files. ConfigObj is a module to enable you to much more *simply*...
0
by: Chad A. Beckner | last post by:
I am starting to work on implementing ASP.NET (using VS.NET Dev 2003) into our current ASP 3.0 intranet setup. We have several (say 15 - 20) "applications" that are run within our intranet, which...
4
by: Chiller | last post by:
Ok, thanks to some good assistance/advice from people in this group I've been able to further develop my Distance class. Since previous posts I've refined my code to accept the unit measurement...
22
by: Daniel Billingsley | last post by:
Ok, I wanted to ask this separate from nospam's ridiculous thread in hopes it could get some honest attention. VB6 had a some simple and fast mechanisms for retrieving values from basic text...
3
by: lobrys | last post by:
Hi I am building a dotnet 1.1 app, in VB.net ... I would like to have several config files corresponding to multiple envirronment (Database, local Machine, Application, User...) and overloads...
1
by: Joseph Geretz | last post by:
I need to download a greater than 4 megabyte attachment via WSE / DIME. The only way I know how to configure this is via a .config file. Normally, the ..config file is the same name as the base...
1
by: herbert | last post by:
In VS.2005 a Windows Service can have an app.config file. A class library can also have an app.config file. Now if my Windows Services uses three class libraries, each of it coming with its own...
6
by: Jonas Huckestein | last post by:
hello, somehow i can't figure out, how to overload the operator for a referenced object. if i have class MyClass { int operator(int i) { return 1; }; };
5
by: phiefer3 | last post by:
I'm currently a student, but this problem isn't directly related to what I have to do on an assignment. It's just a problem I've had with some supporting features. First of all, I'm using MSVS...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
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: 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...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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.