Ok i've just started to look into just what good CMAB does, and I must say that's quite an awful lot of meta-configuration to get your configuration :)
Trying to get the bare minimum of a single value in an XML file just to see the whole thing in action, I have added into a test web project's Web.config
<configuration>
<configSections>
<section
name="applicationConfigurationManagement"
type="Microsoft.ApplicationBlocks.ConfigurationManagement.ConfigurationManagerSectionHandler,Microsoft.ApplicationBlocks.ConfigurationManagement,Version=1.0.0.0,Culture=neutral,PublicKeyToken=null"
/>
<section
name="FirstAppSettings"
type="Microsoft.ApplicationBlocks.ConfigurationManagement.XmlHashtableSectionHandler,Microsoft.ApplicationBlocks.ConfigurationManagement,Version=1.0.0.0,Culture=neutral,PublicKeyToken=null"
/>
</configSections>
<applicationConfigurationManagement>
<configSection name="FirstAppSettings">
<configProvider
assembly="Microsoft.ApplicationBlocks.ConfigurationManagement,Version=1.0.0.0,Culture=neutral,PublicKeyToken=null"
type="Microsoft.ApplicationBlocks.ConfigurationManagement.Storage.XmlFileStorage"
path="D:\code\RemoteTest\CustomConfig.xml"
signed="false"
encrypted="false"
/>
</configSection>
</applicationConfigurationManagement>
First anomaly: notice the path of the <configProvider> element is hardcoded absolute file system path. If I simply put "CustomConfig.xml" as suggested in the doc I will be thrown Exception:
Can´t find the configuration file System.Xml.XmlDocument. You must check the 'path' attribute in the section 'FirstAppSettings'
The ~ app root doesn't work either.
Second, my CustomConfig.xml as per the doc simply has
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<FirstAppSettings>
<SomeItem>None</SomeItem>
</FirstAppSettings>
</configuration>
and my line of ConfigurationManager.Item["SomeItem"] will complain:
Can't deserialize the Hashtable.
Ok I'm quite lost what is playing up here..... clues please?
The melody of logic will always play out the truth. ~ Narumi Ayumu, Spiral