We help IT Professionals succeed at work.
Get Started

Configuration System Failed to Initialize

Hawkeye6352
Hawkeye6352 asked
on
1,148 Views
Last Modified: 2012-05-12
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.
Comment
Watch Question
CERTIFIED EXPERT
Most Valuable Expert 2011
Top Expert 2015
Commented:
This problem has been solved!
Unlock 1 Answer and 3 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE