Create new C# Library Project Add Reference to System.ServiceModel Define your service interface namespace PubSubLibrary { [ServiceContract( CallbackContract = typeof (IPubSubCallback), SessionMode=SessionMode.Required)] public interface IPubSubService { [OperationContract(IsOneWay = true )] void Subscribe( string clientId); [OperationContract(IsOneWay = true )] void Publish( string clientId, string message); } } Define your callback interface namespace PubSubLibrary { public interface IPubSubCallback { [OperationContract(IsOneWay = true )] void Broadcast(CallbackData callbackData); } [DataContract] public class CallbackData { [DataMember] public string ClientId { get ; set ; } [DataMember] public string Message { get ; set ; } } } Create Server C# Console Project Add Reference to Library project and System.ServiceModel Add App.config item Configure App.config (right click and select Edit WCF Configuration) < configuration > < system.serviceModel >