I have an sp that runs for 45 sec- 1 min but it gives me the error message Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. I have add the Connect Timeout=120 to the connection string but that didnt help. I've also change the IIS application pool to timeout after 2 mins.
<add name="Oconnection" connectionString="Data Source=servername;Initial Catalog=dmName; User ID=username; Password=pw; Connect Timeout=120" />
This is my cs file:
string Oconnection=ConfigurationManager.ConnectionStrings["Oconnection"].ConnectionString;
public DataSet CreateTable()
{
DataSet dsCreateTable;
dsCreateTable = SqlHelper.ExecuteDataset(Oconnection, CommandType.StoredProcedure, "usp_CreateTables");
return dsCreateTable;
}
Do I need to add the timeout in the cs file as well?