private static async Task InvokeServiceMethod() { ServiceProxyFactory proxyFactory = new ServiceProxyFactory( callbackClient => new MyServiceRemotingClientFactory(callbackClient)); ITestService testServiceProxy = proxyFactory.CreateServiceProxy <ITestService>(ServiceName); string activityId = ActivityId.GetOrCreateActivityId(); if (activityId == await testServiceProxy.GetCurrentActivityId()) { Console.WriteLine("Activity ID is {0}", activityId); } else { Console.WriteLine("Local Activity id doesnt match activity id returned by remote method"); } }