By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,672 Members | 1,628 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,672 IT Pros & Developers. It's quick & easy.

How to read same config file from different application

P: n/a
Hi,

How to read same config file from different application?

I have 4 application in VB.NET, all are using different app.config files.
NOW I need all to read only one config file, how can I do this.

Thanks in Adv.

Regards,
Mustaq

Jul 22 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Hi Mustaq,

I believe you want to share a set of settings among different applications.

One way would be to make use of the <appSettings> element file attribute so
that it would refer to a common file.

Check out the same here:
http://msdn.microsoft.com/library/de...ngsElement.asp

--
HTH,
Rakesh Rajan
MVP, MCSD
http://www.msmvps.com/rakeshrajan/

"Mustaq" wrote:
Hi,

How to read same config file from different application?

I have 4 application in VB.NET, all are using different app.config files.
NOW I need all to read only one config file, how can I do this.

Thanks in Adv.

Regards,
Mustaq

Jul 22 '05 #2

P: n/a
Hi Rakesh,

Thanks for your support, What I need is how can I force my VB.NET exes to
read from one config file

Senario, I have 4 Applications
EXE
1. AA.exe
2. BB.exe
3. CC.exe
4. DD.exe

Its Config files are as follows
1. AA.exe.config
2. BB.exe.config
3. CC.exe.config
4. DD.exe.config

all exes are in same directory, so now I need only AA.exe.config to run
other exex as well. Inside parameters are same.

How can I force applications to read read only AA.exe.config file.

Regards,
Mustaq

"Rakesh Rajan" wrote:
Hi Mustaq,

I believe you want to share a set of settings among different applications.

One way would be to make use of the <appSettings> element file attribute so
that it would refer to a common file.

Check out the same here:
http://msdn.microsoft.com/library/de...ngsElement.asp

--
HTH,
Rakesh Rajan
MVP, MCSD
http://www.msmvps.com/rakeshrajan/

"Mustaq" wrote:
Hi,

How to read same config file from different application?

I have 4 application in VB.NET, all are using different app.config files.
NOW I need all to read only one config file, how can I do this.

Thanks in Adv.

Regards,
Mustaq

Jul 22 '05 #3

P: n/a
Hi Mustaq,

There are no built-in methods I know of to accomplish this. Together with:
1. AA.exe.config
2. BB.exe.config
3. CC.exe.config
4. DD.exe.config

, you will need a "common.config" (or any other name) where you would store
your common settings. In other words, the Bin folder will have 5 config files
:(

One way would be to read the settings xml file directly. For an example,
check out this sample:
http://www.windowsforms.net/Applicat...=40&tabindex=9

--
HTH,
Rakesh Rajan
MVP, MCSD
http://www.msmvps.com/rakeshrajan/

"Mustaq" wrote:
Hi Rakesh,

Thanks for your support, What I need is how can I force my VB.NET exes to
read from one config file

Senario, I have 4 Applications
EXE
1. AA.exe
2. BB.exe
3. CC.exe
4. DD.exe

Its Config files are as follows
1. AA.exe.config
2. BB.exe.config
3. CC.exe.config
4. DD.exe.config

all exes are in same directory, so now I need only AA.exe.config to run
other exex as well. Inside parameters are same.

How can I force applications to read read only AA.exe.config file.

Regards,
Mustaq

"Rakesh Rajan" wrote:
Hi Mustaq,

I believe you want to share a set of settings among different applications.

One way would be to make use of the <appSettings> element file attribute so
that it would refer to a common file.

Check out the same here:
http://msdn.microsoft.com/library/de...ngsElement.asp

--
HTH,
Rakesh Rajan
MVP, MCSD
http://www.msmvps.com/rakeshrajan/

"Mustaq" wrote:
Hi,

How to read same config file from different application?

I have 4 application in VB.NET, all are using different app.config files.
NOW I need all to read only one config file, how can I do this.

Thanks in Adv.

Regards,
Mustaq

Jul 22 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.