I'm having trouble using the ConfigurationManagement Application Block.
Using VS.Net 2003, Framework 1.1
app.config is the following:
<configuration >
<configSections>
<section name="applicationConfigurationManagement"
type="Microsoft.ApplicationBlocks.ConfigurationMan agement.ConfigurationManagerSectionHandler,Microso ft.ApplicationBlocks.ConfigurationManagement"
/>
<section name="appSettings"
type="Microsoft.ApplicationBlocks.ConfigurationMan agement.XmlHashtableSectionHandler,Microsoft.Appli cationBlocks.ConfigurationManagement"
/>
</configSections>
<appSettings>
<ApplicationName>"Import"</ApplicationName>
</appSettings>
<applicationConfigurationManagement defaultSection="appSettings">
<configSection name="appSettings">
<configProvider
assembly="Microsoft.ApplicationBlocks.Configuratio nManagement"
type="Microsoft.ApplicationBlocks.ConfigurationMan agement.Storage.XmlFileStorage"
signed="false" encrypted="false" />
</configSection>
</applicationConfigurationManagement>
</configuration>
When I try to do:
ConfigurationManager.Read("appSettings");
I get:
An unhandled exception of type 'System.Configuration.ConfigurationException'
occurred in microsoft.applicationblocks.configurationmanagemen t.dll
Additional information: Section or group name 'appSettings' already defined
If I comment out the
<section name="appSettings"
type="Microsoft.ApplicationBlocks.ConfigurationMan agement.XmlHashtableSectionHandler,Microsoft.Appli cationBlocks.ConfigurationManagement"
/>
I get this exception
An unhandled exception of type 'System.Configuration.ConfigurationException'
occurred in microsoft.applicationblocks.configurationmanagemen t.dll
Additional information: Creating Storage Provider and Cache for section
'appSettings' where storage type =
'Microsoft.ApplicationBlocks.ConfigurationManageme nt.Storage.XmlFileStorage' and
assembly = 'Microsoft.ApplicationBlocks.ConfigurationManageme nt'
As far as I can tell, I'm doing it the same as the sample code. Any help would
be appreciated.
Thanks,
Tim