Im using WCF with two endpoints basicHttpBinding and pollingDuplexHttpBinding. Consuming WCF in Silverlight 4. If I have alone basic.. and polling.. it works good. But if I used both in one service and one silverlight project I got message on client side:
"Unrecognized element 'pollingDuplexHttpBinding' in service reference configuration. Note that only a subset of the Windows Communication Foundation configuration functionality is available in Silverlight."
WFC is right referenced to silverlight project, but is not working. Here is web.config of WCF:
<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>
And here is config on client side:
<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" />
Check out this article
You will need to add the following snippet in client config:
<!-- Register the binding extension from the SDK. -->
<extensions>
<bindingExtensions>
<add name=
"pollingDuplexHttpBinding"
type="System.ServiceModel.Configuration.PollingDuplexHttpBindingCollectionElement,System.ServiceModel.PollingDuplex, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</bindingExtensions>