System.ServiceModel 4.0.0.0 System.Enum

The manages the association between the channel and the user-defined service objects. Use the enumeration with the property to specify the lifetime of the object. indigo1 can create a new object for every call, every session or specify that the object is bound to a single service object. For a working example, see the Instancing Sample.

The value specifies that a single object should be used for the lifetime of the service.

If the value is set to the result is that your service can only process one message at a time unless you also set the value to .

Specifies the number of service instances available for handling calls that are contained in incoming messages.

- Field
  4.0.0.0
  System.ServiceModel.InstanceContextMode

  A new object is created prior to and recycled subsequent to each call. If the channel does not create a session this value behaves as if it were .

- Field
  4.0.0.0
  System.ServiceModel.InstanceContextMode

  A new object is created for each session.

- Field
  4.0.0.0
  System.ServiceModel.InstanceContextMode

  For singleton lifetime behavior (for example, if the host application calls the constructor and passes an object to use as the service), the service class must set to , or an exception is thrown when the service host is opened.

  Only one object is used for all incoming calls and is not recycled subsequent to the calls. If a service object does not exist, one is created.