【发布时间】:2011-08-25 21:16:12
【问题描述】:
我已按照本教程构建我的聊天应用程序。当我尝试添加对我的服务的引用时,我收到以下错误:
Contract 需要 Duplex,但 Binding 'BasicHttpBinding' 不支持 或未正确配置为 支持一下。
我的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>
【问题讨论】:
-
我将从更正
mex端点开始。您使用的绑定不正确。 -
谢谢...那该用什么??
-
Mex 端点与
mexHttpBinding一起使用 -
我已将 mex 端点更改为:
但问题仍然存在。
标签: silverlight wcf ria wcf-ria-services duplex