473,386 Members | 1,810 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,386 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 2272
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.