0
votes

I created a simple WCF service that worked just fine. I tried later to make it a duplex service. I created the duplex contract, changed the binding to wsDualHttpBinding and pulish the WSDL. However when I try to do the last step on the client side I face some trouble. Here is what I did on the client side:

    static void Main(string[] args)
    {
        InstanceContext context = new InstanceContext(new CalcCallbackHandler());
        CalcClient proxy = new CalcClient(context);
    }

The problem is that CalcClient ctor can't receive InstanceContext. I can't understand how It's possible beacuse all the example I've seen on the web use this method to create duplex server. Any suggestions?

1
Can you show your Service contract and callback duplex contract?vibhu

1 Answers

2
votes

On the client side you will need to setup/host the call back object and expose the callback endpoint.