Invoking async operation viaChannelFactory

WCF supports asynchronous service operation invoking at the client side, which doesn't require the WCF service to be designed as asynchronous. When we use Visual Studio's Add Service Reference or .NET SDK's Svcutil.exe to generate the client proxy types, we can choose to generate asynchronous methods on the client proxy class (for each service operation). Then, how do we add asynchronous invoking support for a ChannelFactory-based WCF client?

How to do it...

  1. Add async style operation definition into the ServiceContract type (in the service client).

    As described in Use ChannelFactory to consume a WCF service recipe, we need to import the ServiceContract definition into our client application that needs to ...

Get Microsoft Windows Communication Foundation 4.0 Cookbook for Developing SOA Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.