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,Syst em"/>
<section name="SearchInvoiceList" type=
"System.Configuration.NameValueSectionHandler,Syst em"/>
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