tags:

views:

23

answers:

1

It is easy to do Asynchronous calls if the client proxy is created with “add service reference”, just call the “BeginMyMethod()” and “EndMyMethod()” calls on the generated client interface.

However what you I do when I am used an interface that is defined in shared contract assemblies?

E.g. the interface only contains “MyMethod()”


Is there a way to do this without editing the interface, .e.g.

CallAsyn("MyMethod", input1, input2)

A: 

You have to create the BeginMyMethod and EndMyMethod methods yourself. Check this link for more info.

Blake Pettersson
I have defined my own interface that have the Begin/End methods added, however when I call OperationContext.Current.GetCallbackChannel<IMyInterface> I get told that the proxy can not be cassed to IMyInterface
Ian Ringrose