title: Configuration System Failed To Initialize
body: <p>In my application when I try to get the connection string by using this code :</p>
  
  <pre><code> System.Configuration.ConfigurationManager.ConnectionStrings["ConStr"].ConnectionString;
  </code></pre>
  
  <p>It throws an exception that "Configuration System Failed To Initialize". Where is the format of app.config wrong ?</p>
  
  <pre><code> &lt;?xml version="1.0"?&gt;
      &lt;configuration&gt;
  
  
        &lt;connectionStrings&gt;
          &lt;add name="ConStr" connectionString="Integrated Security=false;Persist Security Info=False;User ID=funny;password=veryfunny;Initial Catalog=vegimanager;Data Source=.\sqlexpress;"/&gt;
        &lt;/connectionStrings&gt;
  
  
  
        &lt;configSections&gt;
          &lt;sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"&gt;
            &lt;section name="Vegi_Manager.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false"/&gt;
          &lt;/sectionGroup&gt;
        &lt;/configSections&gt;
  
  
  
  
        &lt;userSettings&gt;
          &lt;Vegi_Manager.Properties.Settings&gt;
            &lt;setting name="FIRMNAME" serializeAs="String"&gt;
              &lt;value/&gt;
            &lt;/setting&gt;
            &lt;setting name="FIRMADDRESS" serializeAs="String"&gt;
              &lt;value/&gt;
            &lt;/setting&gt;
            &lt;setting name="FIRMCITY" serializeAs="String"&gt;
              &lt;value/&gt;
            &lt;/setting&gt;
            &lt;setting name="FIRMSTATE" serializeAs="String"&gt;
              &lt;value/&gt;
            &lt;/setting&gt;
            &lt;setting name="FIRMPHONE" serializeAs="String"&gt;
              &lt;value/&gt;
            &lt;/setting&gt;
            &lt;setting name="FIRMMOBILE" serializeAs="String"&gt;
              &lt;value/&gt;
            &lt;/setting&gt;
            &lt;setting name="FIRMEMAIL" serializeAs="String"&gt;
              &lt;value/&gt;
            &lt;/setting&gt;
            &lt;setting name="FIRMTIN" serializeAs="String"&gt;
              &lt;value/&gt;
            &lt;/setting&gt;
            &lt;setting name="FIRMPAN" serializeAs="String"&gt;
              &lt;value/&gt;
            &lt;/setting&gt;
            &lt;setting name="FIRMMANDITAXNO" serializeAs="String"&gt;
              &lt;value/&gt;
            &lt;/setting&gt;
            &lt;setting name="INITIALFONFIGDONE" serializeAs="String"&gt;
              &lt;value&gt;False&lt;/value&gt;
            &lt;/setting&gt;
            &lt;setting name="FIRMJURISDICTION" serializeAs="String"&gt;
              &lt;value/&gt;
            &lt;/setting&gt;
            &lt;setting name="FIRMBANKDETAILS" serializeAs="String"&gt;
              &lt;value/&gt;
            &lt;/setting&gt;
            &lt;setting name="FIRMDETAILS" serializeAs="String"&gt;
              &lt;value/&gt;
            &lt;/setting&gt;
            &lt;setting name="BILLFORMATNO" serializeAs="String"&gt;
              &lt;value&gt;0&lt;/value&gt;
            &lt;/setting&gt;
            &lt;setting name="PRINTERNAME" serializeAs="String"&gt;
              &lt;value/&gt;
            &lt;/setting&gt;
          &lt;/Vegi_Manager.Properties.Settings&gt;
        &lt;/userSettings&gt;
  
  
  
        &lt;startup&gt;
          &lt;supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/&gt;
        &lt;/startup&gt;
      &lt;/configuration&gt;
  </code></pre>