Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / October 2007

Tip: Looking for answers? Try searching our database.

How to use a shared app.config file?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
AAOM Tim - 09 Oct 2007 01:11 GMT
.Net 2.0 I have a variety of console applications that run continuiously in
parallel using the file watcher as an event queue.  In addition, I have an
ASP.Net website that needs to access the same key/value pairs as the console
apps.  I have configured a separate app.config file for each console app and
have a separate web.config file for the web site.  To simplify the
configuration, I would like to use a single app.config file that can be
accessed by each application.  Is there a simple way to do this?

Thanks,
Signature

Tim Meagher

Chris Mullins [MVP - C#] - 09 Oct 2007 01:17 GMT
A few things come to mind, none of which are probably what you're looking
for:

- Put the relevent entries in the machine.config. This way everything can
see them. This would be very, very easy.

- From your main entry point, create a new appdomain and set it's config
file to be the shared config file. Set the entry point to be the relevant
code, and let your code start running.

- Store the data in a database, and read it from each app.

- Store the data in an XML file somewhere, and just have each app open the
file and read the values out.

--
Chris Mullins

> .Net 2.0 I have a variety of console applications that run continuiously
> in
[quoted text clipped - 8 lines]
>
> Thanks,

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.