silverlight – 合同需要Duplex,但Binding’BasicHttpBinding’不支持它,或者没有正确配置以支持它

silverlight – 合同需要Duplex,但Binding’BasicHttpBinding’不支持它,或者没有正确配置以支持它,第1张

概述我已经按照本教程构建了聊天应用程序.当我尝试添加我的服务的引用时,我收到以下错误: Contract requires Duplex, but Binding ‘BasicHttpBinding’ doesn’t support it or isn’t configured properly to support it. 我的web.config如下: <extensions> <bindin 我已经按照本教程构建了聊天应用程序.当我尝试添加我的服务的引用时,我收到以下错误:

Contract requires Duplex,but Binding
‘BasichttpBinding’ doesn’t support it
or isn’t configured properly to
support it.

我的web.config如下:

<extensions>  <bindingExtensions>    <add name="pollingDuplex" type="System.ServiceModel.Configuration.PollingDuplexhttpBindingCollectionElement,System.ServiceModel.PollingDuplex,Version=4.0.0.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35" />  </bindingExtensions></extensions><bindings>        <pollingDuplex>    <binding name="chatPollingDuplex" duplexMode="MultipleMessagesPerPoll"/>  </pollingDuplex></bindings>    <services>        <service name="PrototypeSite.ChatService">            <endpoint address="" binding="pollingDuplex" bindingConfiguration="chatPollingDuplex" contract="PrototypeSite.ChatService" />    <endpoint address="mex" binding="wsDualhttpBinding" contract="IMetadataExchange"/>  </service>      </services>
解决方法 当我遇到这个错误时,它给我带来了很多痛苦,但解决方案很简单 – 在web.config中仔细检查服务名称.

无论您是否在同一Web组件中提供服务,您都必须包含服务的完整Typename

总结

以上是内存溢出为你收集整理的silverlight – 合同需要Duplex,但Binding’BasicHttpBinding’不支持它,或者没有正确配置以支持它全部内容,希望文章能够帮你解决silverlight – 合同需要Duplex,但Binding’BasicHttpBinding’不支持它,或者没有正确配置以支持它所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/1004774.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-22
下一篇 2022-05-22

发表评论

登录后才能评论

评论列表(0条)

保存