WCF 可靠会话的目的是什么? [英] What is the purpose of WCF reliable session?

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

问题描述

关于这个主题的文档很差.我将 WCF 服务与托管在 Windows 服务中的 NetTcpBinding 一起使用.问题是会话在一段时间处于非活动状态时会被丢弃.我需要的是永远活着的会话.WCF 可靠会话是否有帮助?或者我可以只玩超时设置?

The documentation around this topic is poor. I use WCF services with NetTcpBinding hosted in Windows service. The problem is that a session is dropped when it is inactive for some time. What I need is the session which is always alive. Is WCF reliable session something that can help? Or I can just play with timeout settings?

推荐答案

不,可靠的会话也会像任何其他会话一样超时.真正的主要问题是:你到底为什么希望你的会议是无休止的"?如果你真的需要这个,你需要增加会话的超时时间.

No, a reliable session will time out just like any other session, too. The main question really is: why on earth do you want your sessions to be "endless" ?? If you really need this, you need to crank up the timeouts on the session.

可靠会话的要点是调用者会知道丢失的任何消息.与流行的看法相反,可靠会话不能保证消息的传递 - 但如果消息无法传递,至少调用者会知道.

The point of a reliable session is that the caller will know about any messages that are lost. Contrary to popular belief, the reliable session cannot guarantee delivery of a message - but if a message can't be delivered, at least the caller will know about it.

查看其中一些资源以了解更多背景信息:

Check out some of these resources for more background info:

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

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