0

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" />
Musketyr
  • 745
  • 1
  • 16
  • 37

1 Answers1

0

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>

ViktorZ
  • 901
  • 1
  • 10
  • 26
  • I have this in config file on both side. I dont write all configuration of WCF and client. The article I red and alone duplex polling working, but with basic not working. – Musketyr Dec 15 '11 at 09:03
  • If basic means basicHttpBinding you will need another service for that. Duplexes and basic services are incompatible so you need at least 2 services. – ViktorZ Dec 15 '11 at 09:33