Posted on: 9/30/2012 2:33:07 AM | Views : 206

Hi,
I keep getting this error randomly:
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.
The code it's complaning about is below:
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; ...

Go to the complete details ...