Session Mode Enumeration in WCF – Easy WCF
Skip to content

Session Mode Enumeration in WCF

Why we need SessionMode Enumeration:

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, admin. All rights reserved.

One thought on “Session Mode Enumeration in WCF

  1. Pingback: WCF Interview Questions (Part – 2) | Easy WCF

Leave a Reply

Your email address will not be published. Required fields are marked *