views:

537

answers:

3

Hi,

I've been looking at the PollingDuplexHttpBinding available in silverlight 2 and 3 and had a couple of questions I haven't been able to find any information on.

  1. Am I able to use this in non-silverlight apps?
  2. From the descriptions it doesn't seem like its actually polling, but maintaining an open connection and reconnecting as necessary. Is this correct?

  3. Is it possible to use this over https?

A: 

As far as I am aware only BasicHttpBinding is available in SL2.

SL3 introduces more binding features: http://www.silverlight-travel.com/blog/2009/05/18/wcf-binary-bindings-in-silverlight-3/

All can work over HTTPS as this is defined on your enpoint:

<bindings>
  <basicHttpBinding>
   <clear />
   <binding name="Service.Host.BasicHttpBinding.Secure">
    <security mode="Transport" />
   </binding>
  </basicHttpBinding>
 </bindings>

HTH, Mark

Mark Cooper
Nope, SL2 supports PollingDuplexHttpBinding.
MrLane
+1  A: 
  1. Creating a duplex service is intended to be done using WCF, this means the client that accesses the PollingDuplex service, such as adobe air or silverlight, must support the binding.

  2. I'm not too familiar with the inner workings of this binding, from what ive seen, the client keeps listening on an agreed port awaiting the callback after the initial call, the polling comes in when the client "polls" the server asking if its done yet, where the server can send information on its status (customizable). At the end of the day, when the servers done, it will call the client

  3. Yes, and if you are going to, remember, cross domain policies for https (must be specified in crossdomain policy)

Neil
+1  A: 

I've just completed some work with SL4 and this binding and it does poll from the client, it's "fake" bidirectional comms. (You'll see there's config settings for how many messages the server must return on each poll) If you want real bidrection calls you have to use net.tcp.

Doobi