Question : Dynamically changing WCF sendTimeout


My client proxy is generated using a configuration file.  For most operations in my WCF service the deafault sendTimeout of 1 minute is sufficient.  However, I need to increase this for one particular operation.

I try to change this programmatically as follows:

_dstServiceProxy.ChannelFactory.Endpoint.Binding.SendTimeout = TimeSpan.FromMinutes(10);

but it has no effect - I get a TimeoutException.  I've checked out the SendTimeout value in the debugger and it has been set to the desired 10 minutes but it doesn't seem to have been accepted by the proxy.

Any ideas why this isn't working?

Answer : Dynamically changing WCF sendTimeout

UPDATE:

I got the desired effect using the following:

 _dstServiceProxy.InnerChannel.OperationTimeout = TimeSpan.FromMinutes(10);

This appears to work OK, i.e. I do not get a timeout from my lengthy operation when this has been set.  When the operation has finished I set the OperationTimout back to a minute.

I've tried to find a description on OperationTimout and how it differes from other timeouts (namely sendTimeout) but I've struggled to find anything.

This leads to the following questions:

1)  Is changing the OperationTimout on the client OK?
2)  What exactly is OperationTimout and how does it differ to SendTimeout (from what information I have managed to find, it suggested that SendTimeout sets the OperationTimout? I'm very confused!)

Many thanks.
Random Solutions  
 
programming4us programming4us