title: Asp.Net Application Database Connection issue
body: <p>When I try to write in C# a connection to my app to my database, I build the application successfully in Visual Studio 2005 but when I run the site in debugger i get an error:</p>
  
  <pre><code>Exception Details: System.ArgumentException: Format of the initialization string does not conform to specification starting at index 118.
  </code></pre>
  
  <p>Here is the connection code that is giving the error:</p>
  
  <pre><code>SqlConnection con = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["Server"].ConnectionString);
  </code></pre>
  
  <p>I have the connection string written correctly in my web.config, file so im clueless on what this remotely means. Im not sure if im missing anything. Any help appreciated. Here is my entire code for the section that might help:</p>
  
  <pre><code>using System;
  using System.Data;
  using System.Configuration;
  using System.Collections;
  using System.Web;
  using System.Web.Security;
  using System.Web.UI;
  using System.Web.UI.WebControls;
  using System.Web.UI.WebControls.WebParts;
  using System.Web.UI.HtmlControls;
  using System.Web.Configuration;
  using System.Data.SqlClient;
  
  public partial class RateAnalyzerPage: System.Web.UI.Page
  {
      protected void Search_Click(object sender, EventArgs e)
      {
          string IDnumber = mechantNumber.Text;
          string selectSQL = "SELECT FROM Authors Where MID='"+ IDnumber +"'";
     // SqlConnection con = new SqlConnection(@"Server="); 
      //SqlConnection con = new SqlConnection();
      SqlConnection con = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["Server"].ConnectionString);
      SqlDataReader reader;
      try
      {
          con.Open();
          SqlCommand cmd = new SqlCommand(selectSQL, con);
          reader = cmd.ExecuteReader();
          while (reader.Read())
          {
              QualVol.Text = reader["TotalVolume"].ToString();
          }
          reader.Close();
      }
      catch (Exception err)
      {
  
      }
      finally
      {
          con.Close();
      }
  }
  }
  </code></pre>
  
  <p>Let me know if im missing some data that would help.</p>
  
  <p>Heres the connection string:</p>
  
  <p>
    
      </p>