Timeouts WCF Services

ε祈祈猫儿з 提交于 2019-11-26 18:31:11
Brian

Client side:

  • SendTimeout is used to initialize the OperationTimeout, which governs the whole interaction for sending a message (including receiving a reply message in a request-reply case). This timeout also applies when sending reply messages from a CallbackContract method.
  • OpenTimeout and CloseTimeout are used when opening and closing channels (when no explicit timeout value is passed).
  • ReceiveTimeout is not used.

Server side:

  • Send, Open, and Close Timeout same as on client (for Callbacks).
  • ReceiveTimeout is used by ServiceFramework layer to initialize the session-idle timeout.

The source is Brian McNamara on MSDN forums.

See "Timeouts in WCF and their default values" http://blogs.msdn.com/b/hongmeig/archive/2010/03/06/timeouts-in-wcf-and-their-default-values.aspx

Timeouts on binding-SendTimeout, ReceiveTimeout, OpenTimeout and CloseTimeout. They can be set easily either through config or code on the Binding. The default value for those are 1 minute.

ServiceHost has OpenTimeout and CloseTimeout. Default for OpenTimeout is 1 minute, and default for CloseTimeout is 10 seconds.

Timeouts on client side channel. There is an OperationTimeout, which you can set it by casting the channel to IContextChannel. The default for this is also 1 minute. Ttimeout on tcp transport, called ChannelInitializationTimeout, and its default value is 5 seconds.

ASPNET. There are shutdown timeout, just like the service host close timeout, default is 90 seconds. ExecutionTimeout, just like our operation timeout, default is 110 seconds.

In addition to what was on that post, there's also the Operation Timeout defined on the client end. See this:

http://final-proj.blogspot.com/2009/09/wcf-timeouts.html

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!