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 / September 2007

Tip: Looking for answers? Try searching our database.

Accessing configuration files from class library classes

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Oldman - 11 Sep 2007 20:50 GMT
This has been bothering me for awhile now and I need to ask the question.  
There are classes in the BCL and in third party apps that access the
configuration file programmatically.  Let me use the new WCF class
ServiceHost as an example.  The service host class can be completely setup
programmatically or it can be setup declaratively through the configuration
file.  So my question is how do they program it to read the configuration
when that configuration could be in a Web.config or an app.config.  Do they
just always use the ConfigurationManager class to access the config file?

Thanks
Vadym Stetsiak - 12 Sep 2007 09:15 GMT
Hello, Oldman!

There is nice set of articles about configuration files in .NET 2.0

http://www.codeproject.com/dotnet/mysteriesofconfiguration.asp
http://www.codeproject.com/dotnet/mysteriesofconfiguration2.asp
http://www.codeproject.com/dotnet/mysteriesofconfiguration3.asp

--
With best regards, Vadym Stetsiak.
Blog: http://vadmyst.blogspot.com

You wrote  on Tue, 11 Sep 2007 12:50:01 -0700:

O> This has been bothering me for awhile now and I need to ask the
O> question.
O> There are classes in the BCL and in third party apps that access the
O> configuration file programmatically.  Let me use the new WCF class
O> ServiceHost as an example.  The service host class can be completely
O> setup  programmatically or it can be setup declaratively through the
O> configuration  file.  So my question is how do they program it to
O> read the configuration  when that configuration could be in a
O> Web.config or an app.config.  Do they  just always use the
O> ConfigurationManager class to access the config file?

O>  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.