Print Page | Close Window

Configuring Push service for 1 second intervals

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2010
Forum Discription: For .NET 4.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=2309
Printed Date: 16-Jun-2026 at 6:41am


Topic: Configuring Push service for 1 second intervals
Posted By: rasmus
Subject: Configuring Push service for 1 second intervals
Date Posted: 15-Nov-2010 at 2:07pm
Hi
 
I have problems configuring the push service for small intervals (fx. 1 secong). Can you show me how to configure the OrderWatcher-method in the TwoSubcription example-project for 1 second push-intervals?
 
-Rasmus



Replies:
Posted By: kimj
Date Posted: 16-Nov-2010 at 12:03pm

The settings for the PollingDuplexHttpBinding in the web.config control this.  The DevForce defaults specify MultipleMessagesPerPoll and a MaxOutputDelay of 3 seconds, but you can change these settings and others.   MultipleMessagesPerPoll will stream messages in 32k chunks, while the output delay will flush all queued messages after the specified interval.

In theory, changing the MaxOutputDelay to 1 second, or removing the setting altogether to allow the WCF default of 200ms, will do what you need.  In practice, you may run into problems depending on your browser and SDK level (google for more information).   Here's a good overview of the timeouts available:  http://blogs.msdn.com/b/silverlightws/archive/2010/07/16/pollingduplex-multiple-mode-timeouts-demystified.aspx - http://blogs.msdn.com/b/silverlightws/archive/2010/07/16/pollingduplex-multiple-mode-timeouts-demystified.aspx
 


Posted By: rasmus
Date Posted: 16-Nov-2010 at 5:34pm
Hi
 
I just realized my problem was because of my web.config having

<serviceHostingEnvironment aspNetCompatibilityEnabled="true"/>

In order for the push service to work properly this aspNetCom... must be false
 
More info here:
http://blogs.msdn.com/b/silverlightws/archive/2009/09/30/having-a-pollingduplex-service-and-any-other-wcf-service-in-the-same-website-causes-silverlight-calls-to-be-slow.aspx - http://blogs.msdn.com/b/silverlightws/archive/2009/09/30/having-a-pollingduplex-service-and-any-other-wcf-service-in-the-same-website-causes-silverlight-calls-to-be-slow.aspx
 
-Rasmus



Print Page | Close Window