tsfaridi 0 Newbie Poster

Hello!

I have followed this tutorial for building my chat application. When i try to add reference of my service i get the following error:

Contract requires Duplex, but Binding 'BasicHttpBinding' doesn't support it or isn't configured properly to support it.


My web.config is as follows:

<system.serviceModel>    
    <extensions>

      <bindingExtensions>
        <add name="pollingDuplex" type="System.ServiceModel.Configuration.PollingDuplexHttpBindingCollectionElement,System.ServiceModel.PollingDuplex, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
      </bindingExtensions>
    </extensions>

    <bindings>      
      <pollingDuplex>
        <binding name="chatPollingDuplex" duplexMode="MultipleMessagesPerPoll"/>
      </pollingDuplex>
    </bindings>    

    <services>      
      <service name="PrototypeSite.ChatService">        
        <endpoint address="" binding="pollingDuplex" bindingConfiguration="chatPollingDuplex" contract="PrototypeSite.ChatService" />
        <endpoint address="mex" binding="wsDualHttpBinding" contract="IMetadataExchange"/>
      </service>      
    </services>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.