title: Issue with connection string in web config file
body: <p>I am trying to set the mysql connection in web config file. </p>
  
  <p>Here is the connection string code:</p>
  
  <pre><code>    &lt;connectionStrings&gt;
      &lt;add name="connstring" 
           connectionString="DRIVER={MySQL ODBC= 3.51=        Driver};Database=marctest;Server=localhost;UID=root;PWD=1234;" 
           providerName="System.Data.SqlClient"/&gt;
      &lt;/connectionStrings&gt;
  </code></pre>
  
  <p>and i am accessing it in following step:</p>
  
  <pre><code>    MySqlConnection connmysql = new MySqlConnection(WebConfigurationManager.ConnectionStrings["connstring"].ConnectionString);
  </code></pre>
  
  <p>When I run my code it generates a null reference exception."Object reference not set to an instance of an object."</p>
  
  <p>How can I resolve this issue?</p>