When making async WCF service calls, the service can (and should) perform the received callback. This makes sense in general APM, but in the case of WCF, the callback is actually performed on the client side, which means that the server was essentially able to execute client code.
Can someone shed light on how this is implemented? For example, when using the http binding when a service makes a callback, does it start sending an HTTP response that the WCF client deserializes as a message to make a callback, and the response ends with an End method returning an asynchronous operation? Can a service call a callback twice
Thank!
Edit: Just to make sure this is not confusion, I am not asking about callbacks with duplex contracts, but AsyncCallback is passed in the contract as follows (http://msdn.microsoft.com/en-us/library/ms731177.aspx):
[OperationContractAttribute(AsyncPattern=true)]
IAsyncResult BeginServiceAsyncMethod(string msg, AsyncCallback callback, object asyncState);
string EndServiceAsyncMethod(IAsyncResult result);
source
share