Web.Config Get Config settings at runtime.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi
How do i access the settings defined in the web.config during runtime. GetConfig method is used to access the user defined sections. i would like to get the customErrors mode defined in the web.config from a code behind page. how do i achieve this

Thanks
Augustin
 
Load the Web.Config into a XPathDocument object, and use XPath to
query the node and attribute you need.

Tommy,
 
Hi,
Is there any other way to access the config settings other than parsing the file. would like to know if there are any classes availble in the API that can be used to read the settings.

Thanks,
Augustin
 
Check out the System.Configuration namespace.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

Augustin said:
Hi,
Is there any other way to access the config settings other than parsing
the file. would like to know if there are any classes availble in the API
that can be used to read the settings.
 
Back
Top