standard XML file and the Web.Config file for storing application
settings.
Stuart
*** Sent via Developersdex http://www.developersdex.com ***Nothing except the framework handles all the plumbing for the web.config.
They are both XML files.
"Stuart Ferguson" <stuart_ferguson1@.btinternet.com> wrote in message
news:%23QsTuq%234FHA.1476@.TK2MSFTNGP10.phx.gbl...
>I was wondering if anyone could explain to me the differences between a
> standard XML file and the Web.Config file for storing application
> settings.
> Stuart
> *** Sent via Developersdex http://www.developersdex.com ***
"Stuart Ferguson" wrote ...
>I was wondering if anyone could explain to me the differences between a
> standard XML file and the Web.Config file for storing application
> settings.
Hi Stuart,
I dont claim by any accounts to be an expert, however a few things I am
aware of..
your web.config file IS an xml file
the .config extension enables the server to not display it to "punters"
browsing
you can customise it with your own key/value pair items
you can in addition use your own xml file for configuration information
(ontop of the web.config file)
I hope that helps a bit..
Regards
Rob
Yeah. Also if you store your application settings in web.config it is a
snap to pull them out using:
System.Configuration.ConfigurationSettings.AppSett ings("mystuff")
or the new .NET 2.0's
System.Configuration.ConfigurationManager.AppSetti ngs("mystuff")
Speaking of which, why do you have to add a reference to
System.configuration.dll if you want to use ConfigurationManager, but you
don't for just ConfigurationSettings.
Probably obvious, but I'm just not groking it.
Greg
"Peter Rilling" <peter@.nospam.rilling.net> wrote in message
news:enOWGs%234FHA.3592@.TK2MSFTNGP12.phx.gbl...
> Nothing except the framework handles all the plumbing for the web.config.
> They are both XML files.
> "Stuart Ferguson" <stuart_ferguson1@.btinternet.com> wrote in message
> news:%23QsTuq%234FHA.1476@.TK2MSFTNGP10.phx.gbl...
>>I was wondering if anyone could explain to me the differences between a
>> standard XML file and the Web.Config file for storing application
>> settings.
>>
>> Stuart
>>
>> *** Sent via Developersdex http://www.developersdex.com ***
Greetings,
I am wandering if someone could give me an insight on following...
I have custom settings in my web.config, such as:
<configSections>
<sectionGroup name="STApplication">
<sectionGroup name="WebUI">
<section name="BackLookup"
"System.Configuration.NameValueSectionHandler,Syste m"/>
<section name="SearchInvoiceList" type=
"System.Configuration.NameValueSectionHandler,Syste m"/
with following values:
<!-- Custom Configuration Values -->
<STApplication>
<WebUI>
<BackLookup>
<add key="days" value="30"/>
</BackLookup>
<SearchInvoiceList>
<add key="List0" value="-- ALL --"/>
<add key="List1" value="Client"/>
<add key="List2" value="Parter"/>
</SearchInvoiceList>
</WebUI>
</STApplication>
</sectionGroup>
</sectionGroup>
</configSections
When I load a page,upon attempting to execute line:
WebConfigParams.NameValueCollection collSearchInvList =
(WebConfigParams.NameValueCollection)System.Configuration.ConfigurationSettings.GetConf ig("STApplication/WebUI/SearchInvoiceList");
I get an exception:
Exception creating section handler.
Assembly Load Trace: The following information can be helpful to determine
why the assembly 'System' could not be loaded.
This is something new to me, failing to loading System assembly...Is there
anything related to rights/security...
Any insight would be appreciated.
Thanks
"Rob Meade" wrote:
> "Stuart Ferguson" wrote ...
> >I was wondering if anyone could explain to me the differences between a
> > standard XML file and the Web.Config file for storing application
> > settings.
> Hi Stuart,
> I dont claim by any accounts to be an expert, however a few things I am
> aware of..
> your web.config file IS an xml file
> the .config extension enables the server to not display it to "punters"
> browsing
> you can customise it with your own key/value pair items
> you can in addition use your own xml file for configuration information
> (ontop of the web.config file)
> I hope that helps a bit..
> Regards
> Rob
>
0 comments:
Post a Comment