Hi,
You don't have direct equivalent in WCF for an Application.
But you can maintain state per session with InstanceContextMode.PerSession in ServiceBehavior like this:
[ServiceBehavior(InstanceContextMode = InstanceContextMode.PerSession)]
public class Service : IService
{
}
WCF will create instance for each session initiated by your clients. You can control on a service contract which operation is initiating
[OperationContract(IsInitiating = true)]
and wich is terminating
[OperationContract(IsTerminating = true)]
You can also make your service implementation class disposable, so WCF will call Dispose method whenever session is ended.
Last thing - you have to choose binding that supports sessions, like NetHttpBinding for instance.
Good luck,
Michael Parshin