Let's consider this chat service:(the entire application may be found here)
[ServiceContract(SessionMode = SessionMode.Required, CallbackContract = typeof(IChatCallback))]
interface IChat
{
[OperationContract(IsOneWay = false, IsInitiating = true, IsTerminating = false)]
string[] Join(string name);
[OperationContract(IsOneWay = true, IsInitiating = false, IsTerminating = false)]
void Say(string msg);
[OperationContract(IsOneWay = true, IsInitiating = false, IsTerminating = false)]
void Whisper(string to, string msg);
[OperationContract(IsOneWay = true, IsInitiating = false, IsTerminating = true)]
void Leave();
}
The Join method initiates a session and the Leave method ends it. Let's say i want to authenticate my users, create a service IAuth let's say with 2 methods Login and Logout. How should i initiate and terminate the session(because from what i've read this application requires a session) in this case, having different services? PS: i am new to wcf so any piece of advice helps. Thanks