I have an MVC app wired up to a wcf service, I'm trying to make a todo list app that features tasks that are dependant on other tasks, I have so far had no luck with this but I have built a stored proc, which I'm now calling from my WCF service and giving a response back to the client.
At the moment, the client gives the following error upon being non-responsive for 1 minute;
"The request channel timed out while waiting for a reply after 00:01:00. Increase the timeout value passed to the call to Request or increase the SendTimeout value on the Binding. The time allotted to this operation may have been a portion of a longer timeout."
public DataTable GetAllDependantTasks(string id)
DataTable dt = new DataTable();
using (SqlConnection conn = new SqlConnection())
using (SqlCommand com = new SqlCommand())
conn.ConnectionString = ConfigurationManager.ConnectionStrings["ToDoDatabase"].ConnectionString;
com.Connection = conn;
com.CommandText = "usp_GetAllDependantTaskInfoByID";
com.CommandType = CommandType.StoredProcedure;
com.Parameters.Add(new SqlParameter("@id", id));
SqlDataReader returnvalue = com.ExecuteReader();
//List<DataRow> items = new List<DataRow>();
// foreach (DataRow row in dt.Rows)
throw new RowNotInTableException();
catch (Exception ex)
//TODO: Write error to log
return new DataTable();
private void LoadTasks()
// get the todo list items
ToDoService.ToDoServiceClient client = new ToDoService.ToDoServiceClient();
// List<ToDoService.ToDoItemContract> toDoItems = client.GetToDoItems("").ToList();
List<string> Items = new List<string>();
foreach(var row in client.GetAllDependantTasks("").Rows)
dlTasks.DataSource = Items;
catch (Exception ex)
// TODO: Log error
Maybe the data returned is a lot and it takes time. SqlCommand has a 15 seconds default timeout.
What if you try to do
com.Connection = conn; com.CommandTimeout = 0;
This disable a timeout for connection and allows more time for the execution of the fill. Try to adjust it (the time is in millisecond) to not leave it running indefinitely if something goes wrong.
If not, try setting the operation timout of the webservice with
Webservice.InnerChannel.OperationTimeout = TimeSpan.FromMinutes(10);
Setting it to a longer timespan since the default wcf timespan is 1:00 which is what is happening to you.