Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

StreamedResponse with Silverlight 4 polling duplex not sending updates

I'm trying to enable a streamed response using Silverlight 4 and polling duplex, but I'm getting strange behaviour when the rate at which updates are sent to the client is greater than the maxOutputDelay, which results in no updates being sent.

For example, with a maxOutputDelay of 7 seconds, and 1 update sent every 10 seconds, everything works fine. But if I have a maxOutputDelay of 1 second, and an update sent every 500 milliseconds, the updates just sit on the server side and don't get sent to the client.

It's my understanding that setting transferMode="StreamedResponse" should send the updates immediately to the client, but this doesn't seem to be working.

Here's the binding in my Web.config for the web service:

This config is based on the information from this article: http://blogs.msdn.com/b/silverlightws/archive/2010/06/25/http-duplex-improvements-silverlight-4.aspx

Thanks.

like image 902
Andrew Avatar asked Nov 14 '22 07:11

Andrew


1 Answers

If you are not totally focussed on using Duplex Channels (which are a pain to configure in anything but a single host scenario) it might be worth checking out alternative solutions for implementing Server Callbacks - even if that means that you have to maintain two different types of connection to your backend.

Duplex Channel Alternatives:

  • PokeIn
  • Kaazing WebSocket Gateway
like image 186
Oliver Weichhold Avatar answered Dec 26 '22 06:12

Oliver Weichhold