Based on the documentation available at https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-reliable-services-communication-wcf
Does a Stateful Service in WCF supports Sessions?
Tried the below attributes but it does not work.
[ServiceBehavior(InstanceContextMode = InstanceContextMode.PerSession)]
public class CalculatorService : ICalculator
[ServiceContract(SessionMode=SessionMode.Required)]
public interface ICalculator
Any changes I need to do WCFCommunicationListener to support sessions?
protected override IEnumerable<ServiceReplicaListener> CreateServiceReplicaListeners()
{
return new[]
{
new ServiceReplicaListener( (context) =>
new WcfCommunicationListener<ICalculator>(context, new CalculatorService(),WcfUtility.CreateTcpListenerBinding(),"WCFServiceEndpoint")
)
};
}