This project is read-only.

How to Implement Fault Contracts in Callback Functions

- J.D. Meier, Carlos Farre, Jason Taylor, Prashant Bansode, Steve Gregersen, Madhu Sundararajan, Rob Boucher

In duplex bindings you need to implement the service with a callback contract specifying the interface so the client can implement it. Use the CallbackContract attribute in the service contract to specify the type of callback contract which has the callback function.

The following code example shows a service that specifies a callback contract:
[ServiceContract(CallbackContract = typeof(IMyContractCallback))]
interface IMyContract
   void DoSomething( );
interface IMyContractCallback
   void OnCallBack( );

Additional Resources

Last edited Jun 13, 2008 at 7:46 PM by prashantbansode, version 1


No comments yet.