I have been trying to implement the Configuration Management Application Block and I am running into some trouble. If anyone has experience with this block I would appreciate a nudge in the right direction.
I am getting the following error when I attempt to write to configuration:
============
An unhandled exception of type 'System.Configuration.ConfigurationException' occurred in microsoft.applicationblocks.configurationmanagement.dll
Additional information: Section 'TarponCoreConfig' not defined on the configuration file. Check the /configuration/configSections/section node in the application config file (assemblyfilename.config). This node must be like <section name="XmlConfig" type="WinApp.CustomSectionHandler,WinApp"
/>.
============
Which confuses me. I have traced the problem down to an XPath expression used to retrieve the config section, but it doesnt seem right to me. The Xpath expression is "/configuration/configSections/section[@name='TarponCoreConfig']"
That path doesnt make sense from the configurations I have seen in the documentation. From the reading I have done I have configured my app.config as such:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="applicationConfigurationManagement" type="Microsoft.ApplicationBlocks.ConfigurationManagement.ConfigurationManagerSectionHandler,Microsoft.ApplicationBlocks.ConfigurationManagement, Version=1.0.0.0,Culture=neutral,PublicKeyToken=null" />
</configSections>
<applicationConfigurationManagement>
<configSection name="TarponCoreConfig">
<configProvider
assembly="Microsoft.ApplicationBlocks.ConfigurationManagement,Version=1.0.0.0,Culture=neutral,PublicKeyToken=null"
type="Microsoft.ApplicationBlocks.ConfigurationManagement.Storage.XmlFileStorage"
path="../../TarponConfig.xml"
signed="false"
encrypted="false" />
</configSection>
</applicationConfigurationManagement>
</configuration>
and for the configuration file "TarponConfig.xml" I have configured it as such:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<TarponCoreConfig>
</TarponCoreConfig>
</configuration>
Any help is appreciated.
Thread Closed
This thread is kinda stale and has been closed but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.