Problem: Configuration system failed to initialize

I got this error today and I was shocked… The InnerException was saying something like this

Only one <configSections> element allowed per config file and if present must be the first child of the root <configuration> element.

 

Well I had ONLY 1 configSections element in my App.config…. After loads of hair pulling I discovered its because the <configSections> element has to be defined as the first element in the App.config. Well thanks for the very useful exception message!

I hope this helps whoever encounters the same error…

About these ads

10 thoughts on “Problem: Configuration system failed to initialize

  1. Can someone state where this app.config is? I don’t have one :) or :(

    I am dealing w/ Silverlight not WPF and I get this ridiculous error right after installing VS2010 (“final”) and SL4 tools for VS2010, for each of the app.xaml, page.xaml??

    Thanks!

    • You have to create an app.config for your application / service. Right click in your solution tree > Add > New Item > Application Configuration File.

      Also, search MSDN

  2. Hi man,

    Thanks for you post. I was trying to solve it for about 2 days and thanks your post I could resolve that. I just gave it a shot and it worked fine!!!

    Saudações do Brazil!

    All the best!!!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s