I have the following config file:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="DLLLoadTest.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</sectionGroup>
</configSections>
<!-- Configuration section-handler declaration area. -->
<configSections>
<sectionGroup name="serverControlGroup">
<section
name ="serverControl"
type = "ADMultiDomain.ServerControlSections"
allowLocation = "true"
allowDefinition = "Everywhere"
/>
</sectionGroup>
</configSections>
<!-- Configuration section-handler declaration area -->
<serverControlGroup>
<serverControl controlKey = "1" controlName = "MurachWebControlLibrary.dll" description = "Server Control Test"
location = "C:\LOCAL_DEVELOPMENT\MurachWebControlLibrary\MurachWebControlLibrary\obj\Debug\"
method = "DaysUntilDate" />
</serverControlGroup>
<applicationSettings>
<DLLLoadTest.Properties.Settings>
<setting name="General" serializeAs="String">
<value>"No value, used to generate app.config in proper format"</value>
</setting>
</DLLLoadTest.Properties.Settings>
</applicationSettings>
</configuration>
And I am using the following to intialize my class to read from the app.config:
DLLLoadTest.ServerControlSections config =
(DLLLoadTest.ServerControlSections)System.Configuration.ConfigurationManager.GetSection("serverControlGroup/serverControl");
And I get the following error, when this code tries to execute:
'Configuration System failed to initialize'
Any thoughts why. I made sure that under the root I have configSections.