Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Web.Config Get Config settings at runtime.

Reply
Thread Tools

Web.Config Get Config settings at runtime.

 
 
=?Utf-8?B?QXVndXN0aW4gUHJhc2FubmEuIEo=?=
Guest
Posts: n/a
 
      02-05-2004
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
 
Reply With Quote
 
 
 
 
Tommy
Guest
Posts: n/a
 
      02-05-2004
Load the Web.Config into a XPathDocument object, and use XPath to
query the node and attribute you need.

Tommy,

"Augustin Prasanna. J" <(E-Mail Removed)> wrote in message news:<(E-Mail Removed)>...
> 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

 
Reply With Quote
 
 
 
 
=?Utf-8?B?QXVndXN0aW4=?=
Guest
Posts: n/a
 
      02-06-2004
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
 
Reply With Quote
 
Kevin Spencer
Guest
Posts: n/a
 
      02-06-2004
Check out the System.Configuration namespace.

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

"Augustin" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Settings.settings file with settings for multiple regions donet programmer ASP .Net 3 11-20-2009 03:05 PM
Get data from Local Web.config not machine.config Jerry C ASP .Net 5 10-27-2008 02:12 AM
Class Library reading web.config Settings OR app.config settings leeanne ASP .Net 0 09-24-2008 05:36 PM
dll config and web.config and Label Expressions (binding label text to dll config settings) CSharpner ASP .Net 0 04-09-2007 09:00 PM
Wanted: Help with Document settings\ServerName\ASPNET\Local settings\Temp Siegfried Heintze ASP .Net 0 10-24-2005 06:02 PM



Advertisments