Click here to Skip to main content
13,002,133 members (80,938 online)
Click here to Skip to main content
Add your own
alternative version


3 bookmarked
Posted 1 Mar 2014

Exception: Configuration System Failed to Initialize [With Solution]

, 1 Mar 2014
Rate this:
Please Sign up or sign in to vote.
This tip provides one solution to the exception "Configuration system failed to initialize" in C#


Today I encountered an exception while working on an application. The exception was configuration system failed to initialize. The problem that I was having in my application configuration file was that I declared the <appSettings> tag immediately after the root tag <configuration>.

The schema of a configuration file mandates the <configSections> tag to be the first child of the root tag. Thus, if you put any other tag as the first child of root <configuration> tag, the application would throw an exception. So, ALWAYS, the <configSections> tag should immediately follow root <configuration> tag.

Correct Format

<?xml version="1.0"?> 
      <sectionGroup name="applicationSettings" 

      System, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
          <section name="your_project_name.Properties.Settings" 

          type="System.Configuration.ClientSettingsSection, System, 
          Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089" 

          requirePermission="false" />

Wrong Format

<?xml version="1.0"?>

This is one of the reasons why this exception is thrown. This was the main cause for exception in my case. Hope it works out for you as well!

Hope this helps!


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Amogh Natu
Software Developer
India India
No Biography provided

You may also be interested in...


Comments and Discussions

-- There are no messages in this forum --
Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170624.1 | Last Updated 1 Mar 2014
Article Copyright 2014 by Amogh Natu
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid