Wcf basicHttpBinding 是否支持 PerSession? [英] Does Wcf basicHttpBinding support PerSession?

查看:26
本文介绍了Wcf basicHttpBinding 是否支持 PerSession?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

WCF 中的 basicHttpBinding 是否支持服务行为中的 PerSession 值?

Does the basicHttpBinding in WCF support PerSession value in service behavior ?

在哪里可以找到汇总每个绑定及其选项的所有信息的表格??

Where can i find a table which summarize all the information for each binding and its options ? ?

推荐答案

不,由于 HTTP 协议的无连接特性,basicHttpBinding 不支持此功能.您可以查看以下博文:

No, basicHttpBinding does not support this due to the connectionless nature of the HTTP protocol. You may take a look at the following blog post:

例如,BasicHttpBinding 永远不能有传输级由于 HTTP 协议的无连接特性.这没有安全性和可靠消息传递的 WSHttpBinding 将也不维护传输级会话.在这两种情况下,即使服务配置为InstanceContextMode.PerSession 和合约SessionMode.Allowed,该服务将表现为每次调用服务,并且对 Dispose() 的调用是异步的;也就是说,客户是在 WCF 处理实例时调用后不会被阻塞.

For example, the BasicHttpBinding can never have a transport-level session due to the connectionless nature of the HTTP protocol. The WSHttpBinding without security and without reliable messaging will also not maintain a transport-level session. In both of these cases, even though the service is configured with InstanceContextMode.PerSession and the contract with SessionMode.Allowed, the service will behave as a per-call service, and the calls to Dispose() are asynchronous; that is, the client is not blocked after the call while WCF disposes of the instance.

但是,如果您使用具有安全性的 WSHttpBinding(其默认值配置)或使用可靠的消息传递,或 NetTcpBinding,或NetNamedPipeBinding,则服务将作为每个会话服务.

However, if you use the WSHttpBinding with security (its default configuration) or with reliable messaging, or the NetTcpBinding, or the NetNamedPipeBinding, then the service will behave as a per-session service.

这里有一个系统提供的绑定列表以及一些他们的特点.

And here's a list of system provided bindings along with some of their characteristics.

这篇关于Wcf basicHttpBinding 是否支持 PerSession?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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