私は、basicHttpBinding と pollingDuplexHttpBinding の 2 つのエンドポイントで WCF を使用しています。Silverlight 4 で WCF を使用しています。basic.. と polling.. だけがあれば、うまくいきます。しかし、1 つのサービスと 1 つの Silverlight プロジェクトで両方を使用すると、クライアント側で次のメッセージが表示されました。
「サービス参照構成の要素 'pollingDuplexHttpBinding' を認識できません。Silverlight では、Windows Communication Foundation 構成機能のサブセットのみを使用できることに注意してください。」
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>
クライアント側の設定は次のとおりです。
<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" />