Martin Ba
Martin Ba

Reputation: 38795

Is WCF binding SendTimeout only used to initialize channel OperationTimeout?

Note: I read this, that and yonder, and it's still not entirely clear if I get this:

The WCF Binding SendTimeout, as well as the WCF IContextChannel OperationTimeout both, according to MSDN:

Gets or sets the time period within which an operation must complete or an exception is thrown. (If transaction flow is enabled on the binding or the channel, the operation may take longer to execute than the specified timeout. In these circumstances the operation fails due to the expired timeout and the transaction aborts appropriately.)

And also according to MSDN:

SendTimeout – used to initialize the OperationTimeout, which governs the whole process of sending a message, including receiving a reply message for a request/reply service operation.

So, the SendTimeout property of a Binding is not used as a real timeout at all, it is just(??!) used to initialize the default of (all?) communication Channels' OperationTimeout?

Note: I verified that when I set Binding.SendTimeout to a non-default value, the channel returned by ChannelFactory.CreateChannel (when factory is initialized with the binding) has indeed the same IContextChannel.OperationTimeout as the set SendTimeout.

Is there anything more to this, or is the SendTimeout indeed just the initializer value for the OperationTimeout on the channels?

Upvotes: 1

Views: 427

Answers (2)

toATwork
toATwork

Reputation: 1367

To answer your question in a one liner:

No it is not (only used to initalize the OperationContext).

It is also used to cover the timeout for the write operation itself. I did also answer this here.

Upvotes: 1

Yaron Naveh
Yaron Naveh

Reputation: 24406

In general, all settings on the binding are just for "design time". In run time, they are used initialize the channels which are the effective values.

Upvotes: 1

Related Questions