WCF 绑定 SendTimeout 是否仅用于初始化通道 OperationTimeout?
Is WCF binding SendTimeout only used to initialize channel OperationTimeout?
注意:我读了this, that and yonder,如果我得到这个还不是很清楚:
WCF 绑定 SendTimeout, as well as the WCF IContextChannel OperationTimeout 两者,根据 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.)
也根据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.
所以,绑定 的 SendTimeout
属性 根本没有 用作真正的超时,它 只是 (??!) 用于初始化(所有?)通信频道的默认值' OperationTimeout
?
注意:我验证了当我将 Binding.SendTimeout
设置为非默认值时,ChannelFactory.CreateChannel
返回的通道(当使用绑定初始化工厂时)确实具有相同的 IContextChannel.OperationTimeout
作为设置的 SendTimeout.
是否还有更多内容,或者 SendTimeout 确实只是通道上 OperationTimeout 的初始值?
一般情况下,绑定上的所有设置仅适用于"design time"。在运行的时候,它们被用来初始化有效值的通道。
一次性回答您的问题:
不,不是(仅用于初始化 OperationContext)。
它也用于覆盖写操作本身的超时。我也回答了这个 here.
注意:我读了this, that and yonder,如果我得到这个还不是很清楚:
WCF 绑定 SendTimeout, as well as the WCF IContextChannel OperationTimeout 两者,根据 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.)
也根据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.
所以,绑定 的 SendTimeout
属性 根本没有 用作真正的超时,它 只是 (??!) 用于初始化(所有?)通信频道的默认值' OperationTimeout
?
注意:我验证了当我将 Binding.SendTimeout
设置为非默认值时,ChannelFactory.CreateChannel
返回的通道(当使用绑定初始化工厂时)确实具有相同的 IContextChannel.OperationTimeout
作为设置的 SendTimeout.
是否还有更多内容,或者 SendTimeout 确实只是通道上 OperationTimeout 的初始值?
一般情况下,绑定上的所有设置仅适用于"design time"。在运行的时候,它们被用来初始化有效值的通道。
一次性回答您的问题:
不,不是(仅用于初始化 OperationContext)。
它也用于覆盖写操作本身的超时。我也回答了这个 here.