title: Reading connection string from external config file
body: <p>I have created a console application and an app.config file and Connections.config file.
  The app.config file has a connectionstring property source pointing to the Connections.config</p>
  
  <p>When I tried to read the connection string in the application, I get a <code>ConfigurationErrorException</code></p>
  
  <p>This is my main method.</p>
  
  <pre><code>static void Main(string[] args)
      {
          var settings = ConfigurationManager.ConnectionStrings;
          if (settings != null)
          {
              foreach (ConnectionStringSettings setting in settings)
              {
                  Console.WriteLine(setting.ConnectionString);
              }
          }
      }
  </code></pre>
  
  <p>App.config file</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;configuration&gt;
    &lt;connectionStrings configSource="Connections.config"&gt;&lt;/connectionStrings&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>Connections.config file</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;connectionStrings&gt;
    &lt;add name="SQLDBConnecion"
     providerName="System.Data.ProviderName"
     connectionString="" /&gt;
  &lt;/connectionStrings&gt;
  </code></pre>
  
  <p>Here I observed two things.
  First: If I specify configSource I am unable to read the connection string (throwing exception.)</p>
  
  <p>Second: If I put same connection string in App.config file and tried to read then the code is working but getting two connection string (which supposed to be return only one which is empty string)
  The first connection string is sqlexpress connection string like this</p>
  
  <pre><code>data source=.\SQLEXPRESS;Integrated Security=SSPI;
       AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true
  </code></pre>
  
  <p>second connection string it returning is empty string (This is expected).</p>
  
  <p>I want to read connection string from external file like in my scenario. How to do that? What am I missing here?</p>