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
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
System, Version=18.104.22.168, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
Version=22.214.171.124, Culture=neutral, PublicKeyToken=b77a5c561934e089"
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!