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…

13 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!!!

  3. Pingback: [C#] 구성 시스템을 초기화하지 못했습니다 - 리뷰나라

  4. Pingback: 구성 시스템을 초기화하지 못했습니다 - How IT

  5. Pingback: [C#] Configuration System Failed to Initialize - Pixorix

Leave a comment