0

I have changed a former WCF one-way service to a duplex service so I can implement callbacks.

My actual problem is since that change, every piece of code that instanciates the service proxy needs to be modified to pass an instance context as parameter into the constructor.

There are many, many places in a few different projects that make use of that service. Everyone of them is now broken.

Will I be forced to go back in every proxy instanciation and pass an instance context into the constructor ? Can I avoid this ?

1 Answers1

0

Simply speaking - no you cannot avoid this.. Presumably you need the duplex service for one WCF call to be able to callback... I would probably just create a separate method on the interface rather than changing the existing one so that you don't break the contract between service and client.

  • Thanks for your input. However I don't understand your suggestion. As far as I know, the callback contract can only be assigned to the whole service. It can't be assigned to a specific method. The only way I have found to avoid the existing (one-way) contract breakups is to create a separate WCF service that will handle callbacks. Is that the only solution available ? –  Dec 05 '12 at 16:48
  • sorry been a long day - yes you need to have two services to do this as the [ServiceBehavior] wil be different on each call.. – The Unculled Badger Dec 05 '12 at 17:24