代码之家  ›  专栏  ›  技术社区  ›  Alberto

WCF会话超时

  •  2
  • Alberto  · 技术社区  · 17 年前

    为此,我写道:

    <wsHttpBinding>
        <binding name="ServicesBindings">
          <security mode="Message">
            <message clientCredentialType="Certificate"/>
          </security>
          <reliableSession enabled="true" inactivityTimeout="00:00:30"/>
        </binding>
      </wsHttpBinding>
    

    如果我这样设置:

    <wsHttpBinding>
        <binding name="ServicesBindings" receiveTimeout="00:00:30">
          <security mode="Message">
            <message clientCredentialType="Certificate"/>
          </security>
          <reliableSession enabled="true"/>
        </binding>
      </wsHttpBinding>
    

    一切都是对的。

    谢谢,

    阿尔贝托

    3 回复  |  直到 17 年前
        2
  •  1
  •   James Osborne    13 年前

    ReceiveTimeout是单个接收操作所需的时间。例如,客户端向服务发送消息。如果服务完成读取该消息所需的时间超过ReceiveTimeout,则会出错。 同样,SendTimeout是一个超时,表示单个发送操作可能需要多长时间。

    简单地说,(发送/接收)超时控制着允许发送和接收消息的时间。InactityTimeout是会话的设置,与您允许什么都不发生的时间有关。

        3
  •  0
  •   Elena Elena    17 年前
    推荐文章