Click here to Skip to main content
13,735,781 members
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.

        <binding name="BasicHttpBinding_ILoginServer" />
        <binding name="PollingDuplexHttpBinding_IDialServer">
          <binaryMessageEncoding />
          <httpTransport />
        <binding name="NetTcpBinding_IDialServer">
          <security mode="None" />

      <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"
        contract="DialServerRef.IDialServer" name="PollingDuplexHttpBinding_IDialServer" />
      <endpoint address="net.tcp://localhost:8085/DialServer" binding="netTcpBinding"
        bindingConfiguration="NetTcpBinding_IDialServer" contract="DialServerRef.IDialServer"
        name="NetTcpBinding_IDialServer" />    

Below code for accessing methods.

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

static void Main(string[] args)
// Proxy.RegisterAgent(5,1)

public class TestServiceCallBack : IDialServer
Please suggest if i am doing wrong or something else.
Posted 11-Jan-17 3:34am
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 | Cookies | Terms of Service
Web06-2016 | 2.8.180920.1 | Last Updated 11 Jan 2017
Copyright © CodeProject, 1999-2018
All Rights Reserved.
Layout: fixed | fluid

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