1.

How To Set The Instancing Mode In Wcf Service?

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
}

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
}



Discussion

No Comment Found