title: Object not set to an instance of object
body: <p>I have the following connection string in the web.config file, when I run I get an error </p>
  
  <blockquote>
    <p>"Object not set to an instance of object"</p>
  </blockquote>
  
  <p>at the following line. I am using sql server 2012 db and visual studio 2010.</p>
  
  <pre><code>dbConnectionString = ConfigurationManager.ConnectionStrings["myConnection"].ConnectionString;
  </code></pre>
  
  <p>Config</p>
  
  <pre><code>&lt;connectionStrings&gt;
  &lt;add name="myConnection" connectionString="Data Source=sag-pc\;Initial Catalog=BalloonShop;Persist Security Info=True;User ID=sa;Password=pwd" providerName="System.Data.SqlClient" /&gt;
  </code></pre>