You can create your own sections via configurationHandlers, you can read up
on this at:
http://openmymind.net/Configuration/index.html
However, I think what you are saying is you want to read the application
values from the web.config. A lot of those are read into objects you can
access. For example you can type Page.Trace.TraceMode to get the mode
specified in web.config
You can use Session.SessionMode/TimeOut
You can also get some from Context.IsCustomErrorEnabled
As you can see, they are read into a veriaty of objects...and I'm not sure
all the information is available. You might need to simply read it as an
XML document and parse it....
Not sure why you'd want this information anyways..
Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/
"TPS" <tp*@tps.com> wrote in message
news:uz**************@tk2msftngp13.phx.gbl...
What is the best way to read values from the web.config file.
I know how to read from the appSettings section, I want to read from other
sections like those listed below.
Thanks,
TPS
<customErrors mode="Off" defaultRedirect="/Pages/customerror.aspx"/>
<authentication mode="Forms">
<forms
slidingExpiration="true"
loginUrl="/pages/login.aspx"
name="dusacookie"
timeout="60"
path="/">
</forms>
</authentication>
<trace
enabled="false"
requestLimit="10"
pageOutput="true"
traceMode="SortByTime"
localOnly="true"
/>