How to control the service instance lifetime using code

Apply the ServiceBehaviorAttribute to the service class.

Set the InstanceContextMode property to one of the following values: PerCall,PerSession, or Single.

No comments:

Post a Comment