Hi,
I'm trying to use out of the box "XmlSerializerSectionHandler" section
handler (without doing any custom section handler devlopment) and
although I've gone thruogh all the CMAB documentation and 'quick
starts' it seems I can't find the XML schema which this section
handler expects to see in the configuration file.
Here is the CMAB section of my 'web.config' file:
<configuration>
<configSections>
<section name="applicationConfigurationManagement"
type="Microsoft.ApplicationBlocks.ConfigurationMan agement.ConfigurationManagerSectionHandler,Microso ft.ApplicationBlocks.ConfigurationManagement,Versi on=1.0.0.0,Culture=neutral,PublicKeyToken=null"
/>
<section name="AppConfig2"
type="Microsoft.ApplicationBlocks.ConfigurationMan agement.XmlSerializerSectionHandler,Microsoft.Appl icationBlocks.ConfigurationManagement,Version=1.0. 0.0,Culture=neutral,PublicKeyToken=null"
/>
</configSections>
<applicationConfigurationManagement>
<configSection name="AppConfig1">
<configProvider assembly="Microsoft.ApplicationBlocks.Configuratio nManagement,Version=1.0.0.0,Culture=neutral,Public KeyToken=null"
type="Microsoft.ApplicationBlocks.ConfigurationMan agement.Storage.XmlFileStorage"
refreshOnChange="false"
signed="false"
encrypted="false" />
</configSection>
<configSection name="AppConfig2">
<configProvider assembly="Microsoft.ApplicationBlocks.Configuratio nManagement,Version=1.0.0.0,Culture=neutral,Public KeyToken=null"
type="Microsoft.ApplicationBlocks.ConfigurationMan agement.Storage.XmlFileStorage"
refreshOnChange="false"
signed="false"
encrypted="false" />
</configSection>
</applicationConfigurationManagement>
<AppConfig2>
<!-- Here is my question, What is the expected XML schema to
write the actual XML nodes in this section -->
</AppConfig2>
</configuration>
In my program code I try to use the follwing syntax to access values
in <AppConfig2> section:
Object ConfigValue2 = ConfigurationManager.Read("AppConfig2");
which always returns 'null'.
I'm surprised that 'Practices and Patterns' team has included a quick
start sample for the custom section handler but none for out of the
box XmlSerializerSectionHandler.
To sum this up I need a sample XML configuration file or an XML schema
that shows the correct XMl format which XmlSerializerSectionHandler
expects to see in the XML file.
Any help is greatly appreciated.
Thanks,
PJ