0
2つのエンドポイントbasicHttpBindingとpollingDuplexHttpBindingでWCFを使用しています。 Silverlight 4でWCFを消費しています。 私は単なる基本的なものを持っていて、ポーリングするとうまくいきます。しかし、1つのサービスと1つのSilverlightプロジェクトで両方を使用した場合、クライアントサイドでメッセージを受け取ることができます。サービス参照設定で認識できない要素 'pollingDuplexHttpBinding'
"サービス参照設定で認識できない要素 'pollingDuplexHttpBinding'があります。 "
WFCはsilverlightプロジェクトでは正しく参照されていますが、動作していません。ここ は、WCFのweb.configファイルである:
<services>
<service behaviorConfiguration="Service1Behavior" name="Service1">
<endpoint
address=""
binding="basicHttpBinding"
bindingConfiguration="LargeBuffer"
contract="IService1"
listenUri="http://localhost:7007/Service1.svc">
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<endpoint
address=""
binding="pollingDuplexHttpBinding"
bindingConfiguration="multipleMessagesPerPollPollingDuplexHttpBinding"
contract="ILongService1"
listenUri="http://localhost:7007/Service1.svc/LongService">
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
そしてここでは、クライアント側でconfigです:あなたは、クライアントの設定に次のコードを追加する必要があります
<endpoint address="http://localhost:7007/ServiceWebTDM.svc/LongService"
binding="pollingDuplexHttpBinding" bindingConfiguration="multipleMessagesPerPollPollingDuplexHttpBinding"
contract="GXWebTDM.Web.ILongServiceWebTDM" name="LongServiceWebTDMDev" />
<endpoint address="http://localhost:7007/ServiceWebTDM.svc" binding="basicHttpBinding"
bindingConfiguration="BasicHttpBinding_IServiceWebTDM1" contract="GXWebTDMService.IServiceWebTDM"
name="ServiceWebTDMDev" />
私は彼の設定ファイルは両側にあります。私はWCFとクライアントのすべての設定を書いていません。私は赤と唯一のデュプレックスポーリングの記事ですが、基本は動作しません。 – Musketyr
basicはbasicHttpBindingを意味し、それには別のサービスが必要です。 Duplexesと基本サービスは互換性がないため、少なくとも2つのサービスが必要です。 – ViktorZ