469,283 Members | 2,349 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,283 developers. It's quick & easy.

How to read same config file from different application

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
3 2342
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
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
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.

Similar topics

4 posts views Thread by Programmer | last post: by
reply views Thread by Joan Bos | last post: by
4 posts views Thread by Chris V | last post: by
5 posts views Thread by George | last post: by
3 posts views Thread by Jeff Robichaud | last post: by
4 posts views Thread by brent | last post: by
13 posts views Thread by Khodr | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.