How to run batched WCF service calls in Silverlight BackgroundWorker

Posted by Simon on Stack Overflow See other posts from Stack Overflow or by Simon
Published on 2010-03-17T20:02:38Z Indexed on 2010/03/20 4:01 UTC
Read the original article Hit count: 621

Is there any existing plumbing to run WCF calls in batches in a BackgroundWorker?

Obviously since all Silverlight WCF calls are async - if I run them all in a backgroundworker they will all return instantly.

I just don't want to implement a nasty hack if theres a nice way to run service calls and collect the results.

  • Doesnt matter what order they are done in
  • All operations are independent
  • I'd like to have no more than 5 items running at once

Edit: i've also noticed (when using Fiddler) that no more than about 7 calls are able to be sent at any one time. Even when running out-of-browser this limit applies. Is this due to my default browser settings - or configurable also. obviously its a poor man's solution (and not suitable for what i want) but something I'll probably need to take account of to make sure the rest of my app remains responsive if i'm running this as a background task and don't want it using up all my connections.

© Stack Overflow or respective owner

Related posts about Silverlight

Related posts about backgroundworker