首页 新闻 赞助 找找看

调用WCF双工通信问题

0
悬赏园豆:20 [待解决问题]

      写了一个双工通信的WCF服务接口,在Silverlight调用此服务完全没问题,但在asp.net Web项目中调用服务就报错:请求因 HTTP 状态 415 失败: Unsupported Media Type。

服务配置:
 <services>
      <service name="ReceiveData.IReceiveDataService">
        <endpoint
           address="http://localhost:21443/ReceiveDataService.svc"
           binding="pollingDuplexHttpBinding"
           contract="ReceiveData.IReceiveDataService">
        </endpoint>
        <endpoint
            address="mex"
            binding="mexHttpBinding"
            contract="IMetadataExchange"/>
      </service>
 
    </services>
    <extensions>
      <bindingExtensions>
        <add name=
            "pollingDuplexHttpBinding"
            type="System.ServiceModel.Configuration.PollingDuplexHttpBindingCollectionElement,System.ServiceModel.PollingDuplex, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
      </bindingExtensions>
    </extensions>


    <bindings>
      <pollingDuplexHttpBinding>
        <binding name="multipleMessagesPerPollPollingDuplexHttpBinding"
                 duplexMode="MultipleMessagesPerPoll"
                 maxOutputDelay="00:00:07"/>
      </pollingDuplexHttpBinding>
    </bindings>

是pollingDuplexHttpBinding的通信服务只支持Silverlight,还是在asp.net项目中需要配置什么才能调用吗?求大虾给提示,谢谢!!

植辉的主页 植辉 | 初学一级 | 园豆:39
提问于:2011-11-03 11:42
< >
分享
所有回答(1)
0

不是所有的绑定协议都支持回调操作,BasicHttpBinding,WSHttpBinding绑定协议不支持回调操作;NetTcpBinding和NetNamedPipeBinding绑定支持回调操作;WSDualHttpBinding绑定是通过设置两个HTTP信道来支持双向通信,所以它也支持回调操作

沅江 | 园豆:151 (初学一级) | 2012-01-12 21:49
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册