WCF Timeout - WSDualHttpBinding, How to set OperationTimeout

115 views Asked by At

I'm creating a WSDualHttpBinding (from code), setting the following timeout values:

 peerBinding.CloseTimeout = TimeSpan.FromSeconds(ServiceConnector_Constants.CLOSETIMEOUT);
            peerBinding.OpenTimeout = TimeSpan.FromSeconds(ServiceConnector_Constants.OPENTIMEOUT);
            peerBinding.SendTimeout = TimeSpan.FromSeconds(ServiceConnector_Constants.SENDTIMEOUT);

These constant (for exasperation purposes) values are 600 seconds.

One client connects fine, the others log the following error :

"The open operation did not complete within the allotted timeout of 00:01:00"

This is at the following line of code :

                            _clientFactory.Open();

                        //Log(String.Format("Create Client IN 6"));
                        LogMessage("Creating client...");
                        _serviceConnection = _clientFactory.CreateChannel();
                        LogMessage("Client Created...");

The last logged line is "Creating Client". It appears that the CreateChannel is causing the problem.

But I've set the value > 1 minute. Whatever value I set, the Timeout is ALWAYS reported as 00:01:00!!

I don't understand.

I've read and read about this and the OperationTimeout property. But I cannot find anyway of setting it on a WSDualHttpBinding.

Can anyone please help.

Thanks

1

There are 1 answers

0
Muckers Mate On

The solution is NOT to use wsDualHTTPBinding as advised in this excellent SO solution :why NOT to use wsDualHttpBinding in client/server

Now all is well in the world - and faster.