title: Getting an error: Contract requires Duplex, but Binding 'BasicHttpBinding' doesn't support it or isn't configured properly to support it
body: <p>I have a WCF service and a Silverlight 5 client.
  I've defined the following interfaces:</p>
  
  <pre><code>[ServiceContract(Namespace = "Silverlight", CallbackContract = typeof(IDuplexClient))]
  public interface IDuplexService
  {
      [OperationContract]
      void Subscribe(string userId);
  
      [OperationContract]
      void Unsubscribe(string userId);
  }
  
  [ServiceContract]
  public interface IDuplexClient
  {
      [OperationContract(IsOneWay = true)]
      void PushNotification(string msg);
  }
  </code></pre>
  
  <p>And this is my Web.config file:</p>
  
  <pre><code>&lt;configuration&gt;
    &lt;system.serviceModel&gt;
      &lt;behaviors&gt;
        &lt;serviceBehaviors&gt;
          &lt;behavior name=""&gt;
            &lt;serviceMetadata httpGetEnabled="true" /&gt;
            &lt;serviceDebug includeExceptionDetailInFaults="false" /&gt;
          &lt;/behavior&gt;
        &lt;/serviceBehaviors&gt;
      &lt;/behaviors&gt;
      &lt;serviceHostingEnvironment multipleSiteBindingsEnabled="true" /&gt;
    &lt;/system.serviceModel&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>When I try to run the service I get:</p>
  
  <blockquote>
    <p>The service '/ServerService.svc' cannot be activated due to an exception during compilation.  The exception message is: Contract requires Duplex, but Binding 'BasicHttpBinding' doesn't support it or isn't configured properly to support it.</p>
  </blockquote>
  
  <p>I know I need to add some properties to Web.config, but wherever I looked (and whatever I tried) I couldn't make it work.</p>
  
  <p>I'm new to WCF and I'd like your help on that subject. All my googling lead me nowhere and the answers people who asked here the same question got doesn't work for me.</p>
  
  <p>So I've decided to give up searching and just ask.</p>
  
  <p><strong>Update:</strong> I used this link to create the interface - <a href="http://msdn.microsoft.com/en-us/library/cc645027%28v=vs.95%29.aspx" rel="noreferrer">http://msdn.microsoft.com/en-us/library/cc645027%28v=vs.95%29.aspx</a></p>