写了一个双工通信的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项目中需要配置什么才能调用吗?求大虾给提示,谢谢!!
不是所有的绑定协议都支持回调操作,BasicHttpBinding,WSHttpBinding绑定协议不支持回调操作;NetTcpBinding和NetNamedPipeBinding绑定支持回调操作;WSDualHttpBinding绑定是通过设置两个HTTP信道来支持双向通信,所以它也支持回调操作