Web.Config Get Config settings at runtime.

Discussion in 'ASP .Net' started by =?Utf-8?B?QXVndXN0aW4gUHJhc2FubmEuIEo=?=, Feb 5, 2004.

  1. 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
     
    =?Utf-8?B?QXVndXN0aW4gUHJhc2FubmEuIEo=?=, Feb 5, 2004
    #1
    1. Advertising

  2. =?Utf-8?B?QXVndXN0aW4gUHJhc2FubmEuIEo=?=

    Tommy Guest

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

    Tommy,

    "Augustin Prasanna. J" <> wrote in message news:<>...
    > 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
     
    Tommy, Feb 5, 2004
    #2
    1. Advertising

  3. 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
     
    =?Utf-8?B?QXVndXN0aW4=?=, Feb 6, 2004
    #3
  4. Check out the System.Configuration namespace.

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

    "Augustin" <> wrote in message
    news:...
    > 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
     
    Kevin Spencer, Feb 6, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. CT
    Replies:
    0
    Views:
    531
  2. Siegfried Heintze
    Replies:
    0
    Views:
    2,298
    Siegfried Heintze
    Oct 24, 2005
  3. CSharpner
    Replies:
    0
    Views:
    1,092
    CSharpner
    Apr 9, 2007
  4. leeanne
    Replies:
    0
    Views:
    1,890
    leeanne
    Sep 24, 2008
  5. donet programmer
    Replies:
    3
    Views:
    1,581
    Gregory A. Beamer
    Nov 20, 2009
Loading...

Share This Page