title: WCF duplex channel with callback having async operation contract
body: <p>I have a WCF duplex channel. In the callback, the WCF service shall notify the client and asynchronously wait till the client has completely processed the notification.</p>
  
  <p>In this <a href="https://stackoverflow.com/questions/33451018/calling-a-task-based-asynchronous-one-way-callback-method-from-wcf-service">article</a> I found how I could implement the callback interface:</p>
  
  <pre><code>public interface IClientCallback
  {
      [OperationContract(IsOneWay = true)]
      Task NotifySomething();
  }
  
  // call from WCF service
  await clientCallback.NotifySomething();
  </code></pre>
  
  <p>This is exacly what I need, but I'm a little surprised, because I thought that one way operations can only have <code>void</code> as return type.</p>
  
  <p>See also this <a href="https://msdn.microsoft.com/query/dev12.query?appId=Dev12IDEF1&amp;l=EN-US&amp;k=k(System.ServiceModel.OperationContractAttribute.IsOneWay);k(TargetFrameworkMoniker-.NETFramework,Version%3Dv4.5);k(DevLang-csharp)&amp;rd=true" rel="nofollow noreferrer">MSDN article</a>:</p>
  
  <blockquote>
    <p>One-way methods must not return a value or have ref or out parameters</p>
  </blockquote>
  
  <p>So is the above code really the correct solution for my problem?</p>