开发者

Does Wcf basicHttpBinding support PerSession?

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

Where can i find a table which summarize all t开发者_JS百科he information for each binding and its options ? ?


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:

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.

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


basicHttpBinding does not support sessions - you can see a pretty good overview of the binding features on MSDN (scroll down a little for the Binding Features section)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜