title: connection current state is connecting error message
body: <p>I keep getting this error randomly:</p>
  
  <p>System.Web.Services.Protocols.SoapException: System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.InvalidOperationException: The connection was not closed. The connection's current state is connecting. </p>
  
  <p>The code it's complaning about is below:</p>
  
  <pre><code>        DataSet ds = new DataSet(); 
          cn = new SqlConnection(GetDBConnectionString()); 
  
          using (cn) 
          { 
              try 
              { 
                  SqlCommand cmd = new SqlCommand("uspGetNavigationItems", cn); 
                  cmd.CommandType = CommandType.StoredProcedure; 
                  cn.Open(); 
                  SqlDataAdapter adp = new SqlDataAdapter(cmd); 
                  adp.Fill(ds, "NavItems"); 
              } 
              catch (Exception ex) 
              { 
                  ds = null; 
                  throw ex; 
              } 
              finally 
              { 
                  if (cn.State != ConnectionState.Closed) 
                  { 
                      cn.Close(); 
                  } 
              } 
          } 
  
          if (ds.Tables.Count &gt; 0) 
          { 
              if (ds.Tables[0].Rows.Count &gt; 0) 
              { 
                  return ds.Tables[0]; 
              } 
              else 
              { 
                  return null; 
              } 
          } 
          else 
          { 
              return null; 
          }
  </code></pre>
  
  <p>I don't understand where the problem is, why it's saying the connection is connecting, when I have a finally to clean it up. Is it because i'm using Finally to close and the using statement, which is supposed to close it as well? Again this happens randomly not always, that's why i'm not sure what's going on.</p>
  
  <p>Thank you.</p>