Question

I have a ASP.NET 4.0 app that is calling a WCF service. For testing, the closeTimeout, openTimeout, receiveTimeout, and sendTimeout values in the wsHttpBinding binding are all set to 01:00:00.

When I ran a test in which the service took 5 minutes 40 seconds, I could see the correct results of the WCF service in the app event log. However, the app did not process the results.

In subsequent identical tests in which the WCF service took less than 4 minutes, I could see the same correct results in the app event log, but the app processed the results correctly.

I'm thinking there's another timeout setting I don't know about. Any ideas? Thanks.

Was it helpful?

Solution

Try the OperationTimeout property of the WCF service client where it is instantiated:

MyWCFServiceClient client = new MyWCFServiceClient();
client.InnerChannel.OperationTimeout = new TimeSpan(0, 10, 0);
client.Open();

The above will set the timeout to 10 minutes

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top