I am currently working on a project where I need to manage an application through a wcf client. The problem I am facing is that after making a call to the server, I need the client to expect a callback to be made. Here is the scenario:
I make a service call that shows a window and then the server application is down. When I click the button in the window, it makes a callback to the client. over time, the client user interface must be disconnected - it must wait for a callback. Could you tell me how I can achieve this? Does it have anything to do with the Concurrency mode or the Operation Contract attribute?
This is my code for ServiceContract and CallbackContract:
[ServiceContract(CallbackContract = typeof(IWCFServiceCallback))] public interface IWCFService { [OperationContract] void OpenWindow(); } public interface IWCFServiceCallback { [OperationContract(IsOneWay = true)] void ReturnValue(object[] value); }
source share