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

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

  • Wednesday, February 25, 2009 7:23 AM
     
     
    Hi All,
            I am getting this error.Please provide solution for this.
    Contract requires Duplex, but Binding 'BasicHttpBinding' doesn't support it or isn't configured properly to support it.

    I am using one console app which communicates with windows application via http,wsDualHttp,tcp and named pipe.
    I am getting above error.

    My App.config file is 

    <?xml version="1.0" encoding="utf-8" ?>

    <configuration>

    <system.serviceModel>

    <services>

    <service name="Bartech.Library.BartechService.clsBartechServer">


    <endpoint address = "net.tcp://localhost:811/EfridgeService"

    binding="netTcpBinding" bindingConfiguration="bindCmdHandler"

    contract="Bartech.Library.BartechService.IBSSContract" />

    <endpoint address = "net.tcp://localhost:810/BartechService"

    binding="netTcpBinding" bindingConfiguration="bindCmdHandler"

    contract="Bartech.Library.BartechService.IBartechServer" />

    <endpoint address = "net.tcp://localhost:813/CommunicationViewService"

    binding="netTcpBinding" bindingConfiguration="bindCmdHandler"

    contract="Bartech.Library.BartechService.IBSSCommunicationViewContract" />

    <endpoint address = "net.tcp://localhost:812/BartechService"

    binding="netTcpBinding" bindingConfiguration="bindCmdHandler"

    contract="Bartech.Library.BartechService.IBPMSContract" />



    <endpoint address = "http://localhost:811/EfridgeService"

    binding="basicHttpBinding"

    contract="Bartech.Library.BartechService.IBSSContract" />

    <endpoint address = "http://localhost:810/BartechService"

    binding="basicHttpBinding"

    contract="Bartech.Library.BartechService.IBartechServer" />

    <endpoint address = "http://localhost:813/CommunicationViewService"

    binding="basicHttpBinding"

    contract="Bartech.Library.BartechService.IBSSCommunicationViewContract"/>

    <endpoint address = "http://localhost:812/BPMSService"

    binding="basicHttpBinding"

    contract="Bartech.Library.BartechService.IBPMSContract"/>


    <endpoint address = "net.pipe://localhost/EfridgeService"

    binding="netNamedPipeBinding" bindingConfiguration="bindNetNamedPipeBinding"

    contract="Bartech.Library.BartechService.IBSSContract" />

    <endpoint address = "net.pipe://localhost/BartechService"

    binding="netNamedPipeBinding" bindingConfiguration="bindNetNamedPipeBinding"

    contract="Bartech.Library.BartechService.IBartechServer" />

    <endpoint address = "net.pipe://localhost/CommunicationViewService"

    binding="netNamedPipeBinding" bindingConfiguration="bindNetNamedPipeBinding"

    contract="Bartech.Library.BartechService.IBSSCommunicationViewContract" />

    <endpoint address = "net.pipe://localhost/BPMSService"

    binding="netNamedPipeBinding" bindingConfiguration="bindNetNamedPipeBinding"

    contract="Bartech.Library.BartechService.IBPMSContract" />



    <host>

    <timeouts openTimeout="00:30:00" closeTimeout="00:30:00"/>

    </host>

    </service>

    </services>

    <behaviors>

    <serviceBehaviors>

    <behavior name="BssBehavior">

    <serviceThrottling maxConcurrentCalls="4000" maxConcurrentInstances="4000" maxConcurrentSessions="4000"/>

    <dataContractSerializer maxItemsInObjectGraph="2147483647"/>

    </behavior>

    </serviceBehaviors>

    </behaviors>

    <bindings>

    <netTcpBinding>

    <binding name="bindCmdHandler"

    closeTimeout="00:30:00"

    openTimeout="00:30:00"

    receiveTimeout="00:30:00"

    sendTimeout="00:30:00"

    transferMode="Buffered"

    maxBufferPoolSize="2147483647"

    maxBufferSize="2147483647"

    maxConnections="100"

    maxReceivedMessageSize="2147483647">



    <readerQuotas maxDepth="2147483647"

    maxStringContentLength="2147483647"

    maxArrayLength="2147483647"

    maxBytesPerRead="2147483647"

    maxNameTableCharCount="2147483647" />

    </binding>



    </netTcpBinding>

    <wsDualHttpBinding>

    <binding name="bindWSDualHttpBinding"

    closeTimeout="00:30:00"

    openTimeout="00:30:00"

    receiveTimeout="00:30:00"

    sendTimeout="00:30:00"

    maxBufferPoolSize="2147483647"

    maxReceivedMessageSize="2147483647">

    <readerQuotas maxDepth="2147483647"

    maxStringContentLength="2147483647"

    maxArrayLength="2147483647"

    maxBytesPerRead="2147483647"

    maxNameTableCharCount="2147483647" />

    </binding>

    </wsDualHttpBinding>

    <basicHttpBinding>

    <binding name="bindBasicHttpBinding"

    closeTimeout="00:30:00"

    openTimeout="00:30:00"

    receiveTimeout="00:30:00"

    sendTimeout="00:30:00"

    transferMode="Buffered"

    maxBufferPoolSize="2147483647"

    maxBufferSize="2147483647"

    maxReceivedMessageSize="2147483647">



    <readerQuotas maxDepth="2147483647"

    maxStringContentLength="2147483647"

    maxArrayLength="2147483647"

    maxBytesPerRead="2147483647"

    maxNameTableCharCount="2147483647" />

    </binding>

    </basicHttpBinding>

    <netNamedPipeBinding>

    <binding name="bindNetNamedPipeBinding"

    closeTimeout="00:30:00"

    openTimeout="00:30:00"

    receiveTimeout="00:30:00"

    sendTimeout="00:30:00"

    transferMode="Buffered"

    maxBufferPoolSize="2147483647"

    maxBufferSize="2147483647"

    maxConnections="100"

    maxReceivedMessageSize="2147483647">



    <readerQuotas maxDepth="2147483647"

    maxStringContentLength="2147483647"

    maxArrayLength="2147483647"

    maxBytesPerRead="2147483647"

    maxNameTableCharCount="2147483647" />

    </binding>

    </netNamedPipeBinding>

    </bindings>

    </system.serviceModel>

    I am unable to open service I am getting following error.

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

    I am using following settings in interface contract

    [ServiceContract(SessionMode = SessionMode.Allowed, CallbackContract = typeof(IBSSEvents))]

    public interface IBSSContract

    {
    }




    Suyog

All Replies

  • Friday, February 27, 2009 11:22 AM
     
     Answered

    BasicHttpBinding doesn't support duplex message exchange pattern, please use WSDualHttpBinding instead.

    Thanks


    Another Paradigm Shift
    http://shevaspace.blogspot.com
    • Marked As Answer by Nicholas Allen Tuesday, March 03, 2009 12:04 AM
    •