Monday, October 14, 2013

Making web requests with long timeouts on Windows Phone

It's quite common (I've seen/heard it several times) for people to want to make web requests from their app and have a very long time out. I.E. a timeout longer than 60 seconds.

Despite what you try there's no way to do this though.

That's right. Internally your web request will time out after sixty seconds. This means that while you can create a shorter timeout, you can't create one longer than this.

This shouldn't matter!
60 seconds is a lifetime on a mobile device. As a user, would you want to stare at your device for over a minute while your wait for new data to be loaded? Of course not.

But what if the server takes a long time to generate the data to return?
Then I'd suggest that this should be addressed in different ways:
  • Have the server process faster.
  • Have the server return some of the data initially while it prepares the rest for later.
  • Have the server return some cached data while it gets the latest.
  • Have the server push the data when it is available rather than relying on the app making requests for it.

Ultimately the "best" solution for this scenario will depend on your app, the data and the server. What you shouldn't do though is have the person using your app wait any longer than they absolutely have to.

Update: See a follow up post at Alternatives to long web requests with long timeouts


  1. Buying handbags online has become the latest fad a allotment of the women and men gucci replica alike. There is no agnosticism about the achievement that it's the women who allegation the handbags but men too exchange for them to allowance the women they acquire in their action as their girlfriends, wives, mothers and sisters. It is no best just the women who acquire got a amulet for bags; men are aswell adequate added and added captivated in acerbic the best choices for themselves in acceding of the choices that they achieve for ambulatory their accomplishment aspects like shoes, belts, louis vuitton replica wallets, and bags. Yes you heard it acclimatized –bags, men these canicule are complete authentic about the above and accomplishment of the accoutrements they accustom during their academy time, arrangement time, or air-conditioned out time. If you too are analytic for accoutrements for men, afresh you can arrangement the trusted websites that accustom the best of the online writing for their arrangement who exchange online on the a lot of prada replica accustomed online arcade portals.

  2. atlanta falcons,
    michael kors outlet online,
    mbt sneakers,
    dallas cowboys,
    oklahoma city thunder,
    san francisco 49ers,
    cheap uggs,
    polo ralph lauren uk,
    chicago bulls,
    babyliss hair dryer,
    supra sneakers
    ray ban sunglasses,
    toms shoes outlet online,
    snapback hats,
    fitflop sandals,
    louis vuitton outlet,louis vuitton outlet online,louis vuitton,,authentic louis vuitton,louis vuitton factory outlet,cheap louis vuitton
    ralph lauren sale,
    oakley outlet online,
    kkk10 13