简体   繁体   English

合同要求使用双工,但是绑定“ BasicHttpBinding”不支持它,或者没有正确配置为支持它

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

my project is silverlight and use Ria service. 我的项目是Silverlight,并使用Ria服务。 I want to create a WCF Service, this is my code 我想创建一个WCF服务,这是我的代码

[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
  [ServiceBehavior(InstanceContextMode = InstanceContextMode.Single)]
  public class MessageDuplex : IServiceSide
  {
    public void Attach(string s)
    {      
    }
  }

  [ServiceContract]
  interface IClientSide
  {
    [OperationContract(IsOneWay = true)]
    void SendMessage(string s);
  }

  [ServiceContract(CallbackContract = typeof(IClientSide))]
  interface IServiceSide
  {
    [OperationContract(IsOneWay = true)]
    void Attach(string s);
  }

When i defined IServiceSide without CallbackContract this is add to silverlight project correctly, but when i use CallbackContract this error raise when add Service Referense : "Contract requires Duplex, but Binding 'BasicHttpBinding' doesn't support it or isn't configured properly to support it." 当我定义不带CallbackContract的IServiceSide时,将其正确添加到silverlight项目中,但是当我使用CallbackContract时,添加服务Referense时将引发该错误:它。”

BasicHttpBinding doesn't support duplex services. BasicHttpBinding不支持双工服务。 You must use PollingDuplexHttpBinding . 您必须使用PollingDuplexHttpBinding

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 合同需要Duplex,但Binding'BasicHttpBinding'不支持它,或者没有正确配置以支持它 - Contract requires Duplex, but Binding 'BasicHttpBinding' doesn't support it or isn't configured properly to support it WCF netTcpBinding 问题:合同需要双工,但绑定“BasicHttpBinding”不支持或未正确配置以支持它 - WCF netTcpBinding issue: Contract requires Duplex, but Binding 'BasicHttpBinding' doesn't support it or isn't configured properly to support it 获取错误:合同需要Duplex,但Binding'BasicHttpBinding'不支持它,或者没有正确配置以支持它 - Getting an error: Contract requires Duplex, but Binding 'BasicHttpBinding' doesn't support it or isn't configured properly to support it 无法添加服务器引用:合同需要双工,但绑定“BasicHttpBinding”不支持或未正确配置以支持它 - Cannot add server reference: Contract requires Duplex, but Binding 'BasicHttpBinding' doesn't support it or isn't configured properly to support it 合同需要Session,但Binding'BasicHttpBinding'不支持它,或者没有正确配置以支持它 - Contract requires Session, but Binding 'BasicHttpBinding' doesn't support it or isn't configured properly to support it 合同需要会话,但绑定“WSHttpBinding”不支持它或未正确配置以支持它 - Contract requires Session, but Binding ‘WSHttpBinding’ doesn’t support it or isn’t configured properly to support it Contract需要Session,但是绑定'WSHttpBinding'不支持它。 带有TransportWithMessageCredential的404 - Contract requires Session, but Binding 'WSHttpBinding' doesn't support it; 404 with TransportWithMessageCredential 未正确配置基本HTTP绑定 - Basic HTTP Binding isn't configured properly basicHttpBinding不使用自定义ServiceCredentials - basicHttpBinding doesn't use custom ServiceCredentials 基本HTTP绑定上的SelfHosted WCF服务不支持超过1000个并发请求 - A SelfHosted WCF Service over Basic HTTP Binding doesn't support more than 1000 concurrent requests
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM