WCF:Why we need the sessions?



WCF:Why we need the sessions?..

Answer / bhuwanesh

To co-relate all the messages sent between two endpoints.

WCF sessions have the following main conceptual features:

* They are explicitly initiated and terminated by the
calling application.

* Messages delivered during a session are processed in
the order in which they are received.

* Sessions correlate a group of messages into a
conversation. The meaning of that correlation is an
abstraction. For instance, one session-based channel may
correlate messages based on a shared network connection
while another session-based channel may correlate messages
based on a shared tag in the message body. The features that
can be derived from the session depend on the nature of the
correlation.

* There is no general data store associated with a WCF
session.

When a service contract specifies that it requires a
session, that contract is specifying that all calls (that
is, the underlying message exchanges that support the calls)
must be part of the same conversation. If a contract
specifies that it allows sessions but does not require one,
clients can connect and either establish a session or not
establish a session. If the session ends and a message is
sent through the same channel an exception is thrown.

Except basichttpbinding, wsHttpBinding and NetTcpBinding
supports session.

Is This Answer Correct ?    2 Yes 1 No

Post New Answer

More WCF Interview Questions

How can we achieve operation overloading in WCF service?

0 Answers  


Difference between wcf and web services?

0 Answers  


What are the transport schemes supported by wcf? Give example of address for each scheme.

0 Answers  


In wcf, which contract is used to document the errors occurred in the service to client?

0 Answers  


What are various ways of hosting wcf services?

0 Answers  






What are the types of contract available in wcf?

0 Answers  


tell me what is service and client in perspective of data communication? : Wcf data services

0 Answers  


What is wcf wpf wwf in net?

0 Answers  


What is service proxy in wcf?

0 Answers  


Explain abcs of endpoint?

0 Answers  


What is the "contract" property of endpoint in wcf?

0 Answers  


Define message contracts?

0 Answers  


Categories