Click here to Skip to main content
13,250,043 members (68,023 online)
Rate this:
 
Please Sign up or sign in to vote.
See more:
Contract requires Duplex, but Binding 'CustomBinding' doesn't support it or isn't configured properly to support it


What I have tried:

I got above error while accessing the WCF service using proxy, any one can suggest what the error or cofiguration required in my web.config fileor something else be needed.
 
below client configuration code snippet.
 

<pre><system.serviceModel>
    <bindings>
      <basicHttpBinding>
        <binding name="BasicHttpBinding_ILoginServer" />
      </basicHttpBinding>
      <customBinding>
        <binding name="PollingDuplexHttpBinding_IDialServer">
          <binaryMessageEncoding />
          <httpTransport />
        </binding>
      </customBinding>
      <netTcpBinding>
        <binding name="NetTcpBinding_IDialServer">
          <security mode="None" />
        </binding>
      </netTcpBinding>
    </bindings>
 
    <client>
      <endpoint address="http://XXX.XXX.XX.XX:8086/LoginServer" binding="basicHttpBinding"
        bindingConfiguration="BasicHttpBinding_ILoginServer" contract="LoginServerRef.ILoginServer"
        name="BasicHttpBinding_ILoginServer" />
      <endpoint address="http://XXX.XXX.XX.XX:8084/DialServer" binding="customBinding"
        bindingConfiguration="PollingDuplexHttpBinding_IDialServer"
        contract="DialServerRef.IDialServer" name="PollingDuplexHttpBinding_IDialServer" />
      <endpoint address="net.tcp://localhost:8085/DialServer" binding="netTcpBinding"
        bindingConfiguration="NetTcpBinding_IDialServer" contract="DialServerRef.IDialServer"
        name="NetTcpBinding_IDialServer" />    
    </client>
  </system.serviceModel>


Below code for accessing methods.

public static IDialServer Proxy
{
get
{
var ctx = new InstanceContext(new TestServiceCallBack());
return new DuplexChannelFactory<idialserver>
(ctx, "WSDualHttpBinding_INotificationServices").CreateChannel();
}
}


static void Main(string[] args)
{
// Proxy.RegisterAgent(5,1)
Console.ReadLine();
}

public class TestServiceCallBack : IDialServer
{
}
Please suggest if i am doing wrong or something else.
Posted 11-Jan-17 4:34am
Comments
F-ES Sitecore 11-Jan-17 9:40am
   
Have you googled the error message? Followed any of the suggestions? Have anything you've tried that didn't fix the problem so people don't suggest the same things?
Vikash Kumar Raja 11-Jan-17 9:47am
   
yes i got the faulted state service.

but i didn't get any proper solution.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy |
Web03 | 2.8.171114.1 | Last Updated 11 Jan 2017
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100