WCF会话超时 [英] WCF Session Timeout

查看:134
本文介绍了WCF会话超时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要设置30秒的会话超时。

I want to set a session timeout of 30 seconds.

要做到这一点,我写:

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

但它不工作!

But it don't work!

如果我以这种方式设置:

If I set in this way:

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

这是正确的。

it's all correct.

有人可以解释这样对我?

Can someone explain this to me?

谢谢

阿尔贝托

推荐答案

<一个href="http://msdn.microsoft.com/en-us/library/system.servicemodel.reliablesession.inactivitytimeout.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/system.servicemodel.reliablesession.inactivitytimeout.aspx

不活动超时时间和接收的组合决定的行为。

The combination of the inactivity and receive timeout periods determines the behavior.

这篇关于WCF会话超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆