Monday, April 4, 2011

TimeoutException The request channel timed out while waiting for a reply after 00:01:00. WCF web service

The default value for the send timeout is "00:01:00". If the operation requested by the service consuming application takes more than a minute, the service may have completed the operation, but by the time the application gets the response, the application throws the following exception:

TimeoutException The request channel timed out while waiting for a reply after 0
0:01:00. Increase the timeout value passed to the call to Request or increase th
e SendTimeout value on the Binding. The time allotted to this operation may have
 been a portion of a longer timeout.

If we closely observe the exception, it says to increase the SendTimeOut value. So from the client side we have to increase the SendTimeOut value let say to "00:50:00" or some bigger value.

But, how much to increase? That we can find out by cumulative time taken to request the service + operation time of the service + service response time. We may have to check for the most largest operation expected by the application to perform.

Other option is to follow the following link in the code project:
http://www.codeproject.com/KB/WCF/WCF_Operation_Timeout_.aspx

This might resolve the timeout issue.

No comments:

Post a Comment