title: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding."
body: <p>I am running a stored procedure but while running it shows error like</p>
  
  <blockquote>
    <p>Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.</p>
  </blockquote>
  
  <p>I have set my web config like</p>
  
  <pre><code>   &lt;add name="SAMPLECONNECTION" connectionString="Data Source=ADMIN\SQLEXPRESS;Initial Catalog=PFGRT;Persist Security Info=True;MultipleActiveResultSets=true;User ID=sa;connect Timeout =1000000;Password=PASSWORD"
    providerName="System.Data.SqlClient" /&gt;
  </code></pre>
  
  <p>I tried like set the <code>connect Timeout = 0;</code> also, but I get the same error.</p>
  
  <p>How can I solve it?</p>
  
  <p>My Stored Procedure calling class</p>
  
  <pre><code>public DataSet adFeedBackReportFacultyWise(string SetID, string FacultyID, string SubjectID,string groupid)
  {
      DbUtil du = new DbUtil();
      Dictionary&lt;string, SqlParameter&gt; cmdParameters = new Dictionary&lt;string, SqlParameter&gt;();
      cmdParameters["SetID"] = new SqlParameter("SetID", SetID);
      cmdParameters["FacultyID"] = new SqlParameter("FacultyID", FacultyID);
      cmdParameters["SubjectID"] = new SqlParameter("SubjectID", SubjectID);
      cmdParameters["groupid"] = new SqlParameter("groupid", groupid);
  
      return du.ExecuteQuery("adFeedBackReportFacultyWise", cmdParameters);
  }
  </code></pre>
  
  <p>My DButil Class is</p>
  
  <pre><code>public class DbUtil
  {
      string connection = ConfigurationManager.ConnectionStrings["gatikkcmsConnectionString"].ConnectionString;
  
      public SqlDataAdapter ad;
      public DataTable dt = new DataTable();
      SqlConnection conn;
      SqlCommand cmd = new SqlCommand();
      public DbUtil()
      {
          conn = new SqlConnection(ConfigurationManager.ConnectionStrings["gatikkcmsConnectionString"].ConnectionString);
          cmd = null;
      }
  
      public SqlConnection getConnection()
      {
          return new SqlConnection(connection);
      }
     public int ExecuteCommand(string storedProcName, Dictionary&lt;string, SqlParameter&gt; procParameter)
      {
          int rc;
          using (SqlConnection cn = getConnection())
          {
              cn.Open();
              // create a SQL command to execute the stored procedure
              using (SqlCommand cmd = cn.CreateCommand())
              {
                  cmd.CommandType = CommandType.StoredProcedure;
                  cmd.CommandText = storedProcName;
                  // assign parameters passed in to the command
                  foreach (var procParameters in procParameter)
                  {
                      cmd.Parameters.Add(procParameters.Value);
                  }
                  rc = cmd.ExecuteNonQuery();
              }
              cn.Close();
          }
          return rc;
      }
  }
  </code></pre>