Cancel a long running task over WCF from client
问题 I have a WCF service set to PerCall I would like to know how I can send a Start call from the client to start a long running process, and send a Cancel command to cancel it My WCF service looks something like this [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall)] public class Service1 : IService1 { CancellationTokenSource cancelToken = new CancellationTokenSource(); public void Start() { var compute = Task.Factory.StartNew(StartLongRunningTask, cancelToken.Token); } public