wcf - 超时 WCF 服务

标签 wcf configuration timeout wcf-binding

WCF 中的超时是如何工作的?例如,我知道您可以为客户端绑定(bind)配置sendTimeoutreceiveTimeout。但它们是如何工作的呢?

MSDN 将 sendTimeout 描述为:

A TimeSpan value that specifies the interval of time provided for a send operation to complete. This value should be greater than or equal to Zero. The default is 00:01:00.

什么是发送操作/接收操作?

最佳答案

客户端:

  • SendTimeout 用于初始化OperationTimeout,它控制发送消息的整个交互(包括在请求-回复情况下接收回复消息)。当从 CallbackContract 方法发送回复消息时,此超时也适用。
  • OpenTimeout 和 CloseTimeout 在打开和关闭 channel 时使用(当未传递显式超时值时)。
  • 未使用 ReceiveTimeout。

服务器端:

  • 发送、打开和关闭超时与客户端相同(对于回调)。
  • ServiceFramework 层使用 ReceiveTimeout 来初始化 session 空闲超时。

来源是Brian McNamara on MSDN forums .

关于wcf - 超时 WCF 服务,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/229760/

相关文章:

wcf - 捕获通信异常而不是自定义故障异常 - WCF

algorithm - 什么是解决复杂配置和参数化问题的好算法?

maven-2 - 使用 Maven 的外部配置文件

javascript - 超时或在循环内休眠

android - 在 App Billing 中遇到未决 Intent 和切换 Activity 的问题

ASP.NET应用程序池回收问题

c# - WCF:套接字连接已中止。远程主机超过接收超时

javascript - 用Meteor JS写命令行工具?

postgresql - 尽管连接字符串,Postgres 超时 20-30 秒?

asp.net - WCF 性能与简单的 ASP.NET HttpHandler