Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > How to read standard (i.e. non-custom) Web.Config settings

Reply
Thread Tools

How to read standard (i.e. non-custom) Web.Config settings

 
 
Mark Friedman
Guest
Posts: n/a
 
      10-20-2003
I've seen lots of documentation on how to create and read custom
configuration settings but I'm interested in reading a standard setting
(i.e. the loginUrl attribute of the authentication/forms setting). Do I
have to resort to using straight XML reading or is there some other way to
access standard config settings?

Thanks in advance.

-Mark



 
Reply With Quote
 
 
 
 
Joshua Flanagan
Guest
Posts: n/a
 
      10-21-2003
I haven't tried this, but in theory it should work.

1) Look in <configSections> portion of machine.config to find out which
section handler is used to parse the settings you are interested in.
(probably System.Web.Configuration.AuthenticationConfigHandl er in your
example)

2) Figure out what data type is returned by that section handler (probably
available from the documentation).

3) Call System.Configuration.ConfigurationSettings.GetConf ig() on the
section you are interested in, and cast the result to the data type you
found in step 2

4) Read the properties of the returned object to get the settings.



"Mark Friedman" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I've seen lots of documentation on how to create and read custom
> configuration settings but I'm interested in reading a standard setting
> (i.e. the loginUrl attribute of the authentication/forms setting). Do I
> have to resort to using straight XML reading or is there some other way to
> access standard config settings?
>
> Thanks in advance.
>
> -Mark
>
>
>



 
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
Class Library reading web.config Settings OR app.config settings leeanne ASP .Net 0 09-24-2008 05:36 PM
Can't access C\Documents and Settings\Owner\Local Settings? ECLiPSE 2002 Computer Support 2 09-23-2008 01:32 PM
moving "my documents and settings\user\local settings\temp" FredHead Computer Support 11 01-17-2007 06:03 AM
Wanted: Help with Document settings\ServerName\ASPNET\Local settings\Temp Siegfried Heintze ASP .Net 0 10-24-2005 06:02 PM



Advertisments