title: WCF ChannelFactory with Async pattern
body: <p>i have the following Service Contract</p>
  
  <pre><code>[ServiceContract]
  public interface IDataService
  {
      [OperationContract]
      void UpdateProcessingState(ActionState state);
  }
  </code></pre>
  
  <p>however i want to allow the client <code>ChannelFactory</code> access to an Asynchronous pattern so I've inherited the above contract with </p>
  
  <pre><code>[ServiceContract]
  public interface IDataServiceClient : IDataService
  {
      [OperationContract(AsyncPattern = true, IsOneWay = true)]
      IAsyncResult BeginUpdateProcessingState(ActionState state, AsyncCallback asyncCallback, object obj = null);
  
      void EndUpdateProcessingState(IAsyncResult r);
  
  }
  </code></pre>
  
  <p>I was hoping this would allow me to use the following on the server without having to implement the async stubs, i.e</p>
  
  <pre><code>[ServiceBehavior(InstanceContextMode = InstanceContextMode.PerSession, ConcurrencyMode = ConcurrencyMode.Multiple)]
  [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
  public class DataService : IDataService
  {
      public void UpdateProcessingState(ActionState state)
      {
      }
  
      //public IAsyncResult BeginUpdateProcessingState(ActionState state, AsyncCallback asyncCallback, object obj = null)
      //{
      //    throw new NotImplementedException();
      //}
  
      //public void EndUpdateProcessingState(IAsyncResult r)
      //{
      //    throw new NotImplementedException();
      //}
  }
  </code></pre>
  
  <p>While giving the clients <code>ChannelFactory</code> access to the async methods</p>
  
  <pre><code>ChannelFactory = new ChannelFactory&lt;IDataServiceClient&gt;(GetBinding(), GetEndpoint());
  ChannelFactory.Endpoint.Behaviors.Add(new ProtoEndpointBehavior());
  _proxy = ChannelFactory.CreateChannel();
  
  Proxy.BeginUpdateProcessingState(state, ar =&gt;
  {
  
  });
  </code></pre>
  
  <p>However the client is throwing the following error, i think i can understand why, i'm not sure how to fix it, or even if what i'm trying to do is possible, I've highlighted the part i think is pertinent to the question</p>
  
  <blockquote>
    <p>The synchronous OperationContract method 'UpdateProcessingState' in type 'IDataService' was matched with the asynchronous OperationContract  methods 'BeginUpdateProcessingState' and 'EndUpdateProcessingState' because they have the same operation name 'UpdateProcessingState'. <strong>When a synchronous OperationContract method is matched to a pair of asynchronous OperationContract methods, the two OperationContracts must have the same value for the 'Action' property. In this case, the values are different</strong>. To fix it, change the 'Action property of one of the OperationContracts to match the other. Alternatively, changing the name of one of the methods will prevent matching.</p>
  </blockquote>
  
  <p><strong>Note :</strong> </p>
  
  <p>I know i can just add the stubs to the service and everything is fine, however it would be nice to be able to separate the contracts into service and client, or more specifically, the client contract inheriting from the service contract</p>
  
  <p>Is this possible?</p>