S
Stefano Meier
I have tried the example on the following url but it has given me an error
http://msdn.microsoft.com/library/en-us/cpguide/html/cpcondeclaringsectiongroups.asp
the app.config file is:
<configuration>
<configSections>
<section name="sampleSection"
type="System.Configuration.SingleTagSectionHandler" />
<!--The following code declares a section group called
mySectionGroup. -->
<sectionGroup name="mySectionGroup">
<section name="mySection"
type="System.Configuration.NameValueSectionHandler,System" />
</sectionGroup>
</configSections>
<mySectionGroup>
<mySection>
<add key="key1:value1" />
</mySection>
</mySectionGroup>
</configuration>
And in code the following line generate the error:
System.Configuration.NameValueSectionHandler, system could not be provided
NameValueCollection nvc = (NameValueCollection)
ConfigurationSettings.GetConfig("mySectionGroup/mySection");
Any idea why doesn't work?
http://msdn.microsoft.com/library/en-us/cpguide/html/cpcondeclaringsectiongroups.asp
the app.config file is:
<configuration>
<configSections>
<section name="sampleSection"
type="System.Configuration.SingleTagSectionHandler" />
<!--The following code declares a section group called
mySectionGroup. -->
<sectionGroup name="mySectionGroup">
<section name="mySection"
type="System.Configuration.NameValueSectionHandler,System" />
</sectionGroup>
</configSections>
<mySectionGroup>
<mySection>
<add key="key1:value1" />
</mySection>
</mySectionGroup>
</configuration>
And in code the following line generate the error:
System.Configuration.NameValueSectionHandler, system could not be provided
NameValueCollection nvc = (NameValueCollection)
ConfigurationSettings.GetConfig("mySectionGroup/mySection");
Any idea why doesn't work?