1
votes

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.

1
did you try the OperationTimeout settingconnectedsoftware
I haven't tried it yet, but I read the sendTimeout value is used to initial OperationTimeout, and the sendTimeout is set to an hour. Can it be set via web.config?ScottyB

1 Answers

2
votes

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