WCF session Mode behavior

In WCF you’ve got three Concurency Mode :

Publicités

WCF instanceContextMode

With WCF, you can configure lot of thing.

An interesting setting is the InstanceContextMode

MSDN talk about that :  « Use the InstanceContextMode property to specify when new service objects are created. Because the service object is not directly connected to the communicating channel, the lifetime of the service objects is independent of the lifetime of the channel between a client and the service application. The default value, PerSession, instructs the service application to create a new service object when a new communication session is established between a client and the service application. Subsequent calls in the same session are handled by the same object. » (http://msdn.microsoft.com/library/system.servicemodel.servicebehaviorattribute.instancecontextmode.aspx) Lire la suite