How to set the instancing mode in WCF service?

 Posted by Prasham on 10/21/2010 | Category: WCF Interview questions | Views: 4637 | Points: 40
Answer:

In WCF, instancing mode is set at service level. For ex.

//Setting PerSession instance mode
[ServiceBehavior(InstanceContextMode = InstanceContextMode.PerSession)]
class MyService : IMyService
{
//Implementation goes there
}


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response