.netWCF

SessionMode Enumeration in WCF (Part-26)

Use SessionMode enumeration with the service contract to allow or restrict bindings to use sessions.

Allowed:

  • Service contract supports sessions if the binding supports them
  • This is default value if SessionMode is not defined in service contract

NotAllowed:

  • Service contract doesnot support bindings that initiate sessions

Required:

  • Service contract requires a binding that supports session

The below MSDN link, shows all possible combination of service Instance Context mode values and SessionMode enumeration values and the end result of using each of these combinations with bindings that does and doesnot support sessions.

http://msdn.microsoft.com/en-us/library/system.servicemodel.sessionmode(v=vs110).aspx

© 2015, www.techkatak.com. All rights reserved.