WCF service, request or increase the value of SendTimeout in a binding

I have this problem randomly and I can add / remove / update using WCFServiceClient and then I get the error and its random event ...

below is the client code I'm using ...

using(WCFServiceClient client = new WCFServiceClient ()) 
{ 
     //More codes here 
     Employee emp = new Employee()
     emp = client.GetEmployeeDataById(123); //<<<ERROR    
}

I increase the timeout to two minutes, but still the same:

<binding name="WSHttpBinding_IEmployeeService" maxReceivedMessageSize="200000" sendTimeout="00:02:00" >

//error:

Request timeout after 00: 00: 59.9990000. Increase the timeout value passed to the Request call or increase the SendTimeout value in Binding. The time allotted for this operation may have been part of a longer timeout.

any help? I have seen many posts, but none of them seem to be any correction or guidance.

+3
source share
3 answers

.

http://msdn.microsoft.com/en-us/library/aa355056.aspx

# "using" Dispose(). , Close(), . Dispose() "using", , , , , . .

+1

, , ( )

new WCFServiceClient ("WSHttpBinding_IEmployeeService")
0

I don't know how big the data is for you, but what about getTimeout?

0
source

All Articles