473,625 Members | 3,357 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2598
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.con fig" (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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
447
by: Programmer | last post by:
Hi everyone Well here is my problem I hope you can help me
0
1384
by: Joan Bos | last post by:
Hi, Is there somewhere on the Internet a description of what a .NET application config file should contain? For our application, I have to write passwords encrypted in a config file. The Enterprise Library does have an encryption method, but that method doesn't just return a value - no - it wants to write the value immediately to a config file. Except, it always gives an error, because no config file contents are ever good enough for...
4
2992
by: Chris V | last post by:
I'm having a problem deploying my ASP.NET application to a WIN2k server. (IIS5 .NET 1.1) When I try to access ConfigurationSettings.AppSettings("WhateverValue") I get an "Object reference not set to an instance of an object." message I thought this may have been to do with Virtual Directory settings but I've got the folder set as an application in IIS and asp.net is installed and working. My web.config file is Not Marked read-only and...
5
10996
by: George | last post by:
Hi, Is it possible to specify the location of a web.config file in an ASP.NET application? I have one ASP.NET application which is to be hosted on 2 web sites in the same web server. I want to configure the 2nd web site as virtual directory so that the 2 web sites are pointing to the same application. However, there are different configuration settings for the 2 web sites, so that accessing these 2 sites' same ASP.NET application will...
3
2483
by: Jeff Robichaud | last post by:
Hello, Since it is possible to put application settings in a file other than web.config, I was wondering what is the best practice in doing so vs. putting these settings directly in web.config. My point is that when I deploy an application, I want to overwrite web.config all the time, because the contents of this file has a direct impact on the application's overall behavior. For example, the execution timeout for my app is 60 seconds,...
4
1804
by: brent | last post by:
Currently our application is reading from the web.config, and retrieves a section, "softwareRequirements". Because the section will begin to grow dramatically, I'd like to place it in the SQL database instead. I've imported the values, and am retrieving them as FOR XML AUTO in the stored proc to mimic the structure in the web.config. I'm confused now - what data type is being returned by...
3
304
by: Mustaq | last post by:
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,
5
2282
by: Sridhar | last post by:
Hi, I have created a project which contains classes to read the data from the database. This project has an App.Config file which contains the SqlConnection String. when this code is called from a web application and if I need to read the connection string it is reading the connection string from the web.config of web application. I am not knowing how to change the Application domain so that it reads the App.config file instead of...
13
507
by: Khodr | last post by:
Hello, I am using VS.NET 2003 and vb. I build my application MyApp and it generates MyApp.exe.config. So now MyApp.exe reads parameters from MyApp.exe.config. Great and no problem! I need to run the same program but with different configuration data. So I made a copy of MyApp.exe and MyApp.exe.config to put them in another folder and renamed the copy to MyApp2.exe and MyApp2.exe.config respectively. I ran it but it did not read from...
0
8189
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8635
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8356
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8497
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7184
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6118
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4193
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2621
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1500
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.