Home All Groups Group Topic Archive Search About

How to read configuration section for sub-classes

Author
3 Apr 2007 8:12 PM
Roy
Can ConfigurationSection or ConfigurationElement retrieve the configuration
information in a generic way such as string or XmlNode type?
I have sub-sections in the configuration which is specific for sub-class to
initialize itself and needs to be passed to it in a generic way defined in
base class.

Author
5 Apr 2007 2:45 AM
Rick Strahl [MVP]
Not through the configuration interfaces, but you can certainly load
web.config into an XML document and then parse the sections directly
(assuming you have read access to web.config)

+++ Rick ---

--

Rick Strahl
West Wind Technologies
www.west-wind.com/weblog


Show quote
"Roy" <R**@discussions.microsoft.com> wrote in message
news:4C64D711-89AC-4DA6-B5E6-9FBB73A9BEEE@microsoft.com...
> Can ConfigurationSection or ConfigurationElement retrieve the
> configuration
> information in a generic way such as string or XmlNode type?
> I have sub-sections in the configuration which is specific for sub-class
> to
> initialize itself and needs to be passed to it in a generic way defined in
> base class.

AddThis Social Bookmark Button