gpt4 book ai didi

wcf - Wcf basicHttpBinding 是否支持 PerSession?

转载 作者:行者123 更新时间:2023-12-03 01:23:00 27 4
gpt4 key购买 nike

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

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

最佳答案

不,由于 HTTP 协议(protocol)的无连接特性,basicHttpBinding 不支持此功能。您可以看看following blog post :

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.

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.

这是一个 list of system provided bindings以及它们的一些特征。

关于wcf - Wcf basicHttpBinding 是否支持 PerSession?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7330030/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com