Web Service Start Up

Discussion in 'ASP .Net Web Services' started by Erick, Feb 29, 2008.

  1. Erick

    Erick Guest

    I'm trying to speed up my web services.
    My problem is that the data takes a while to build so I cache it and
    only refresh the data every 24 hours.
    However, the data will only cache after the first person requests it.
    This causes a 3 minute delay before the user gets a response and the
    session times out. Once in Cache the response is almost
    instantanious.

    is there a way that i can load my cache so that the data is already
    sitting in cache before the first user makes any web method requests?

    Global.asax on start only runs when the first user makes a request. I
    need to it run before that.

    Regards

    Josef
    Erick, Feb 29, 2008
    #1
    1. Advertising

  2. Erick

    Spam Catcher Guest

    Erick <> wrote in news:497333f6-75d6-4428-8548-
    :

    > is there a way that i can load my cache so that the data is already
    > sitting in cache before the first user makes any web method requests?
    >
    > Global.asax on start only runs when the first user makes a request. I
    > need to it run before that.


    If you need to statefully store information, have you considered caching it
    in a local database?

    Otherwise, you could create a stateful process (i.e. service) and fetch it
    locally from there.

    Lastly, there are ways to keep ASP.NET from recycling the appdomain, but it
    seems a bit hackish to do:

    http://weblogs.asp.net/pwilson/archive/2003/12/02/40681.aspx


    --
    (Do not e-mail)
    Spam Catcher, Feb 29, 2008
    #2
    1. Advertising

  3. "Erick" <> wrote in message
    news:...
    > I'm trying to speed up my web services.
    > My problem is that the data takes a while to build so I cache it and
    > only refresh the data every 24 hours.
    > However, the data will only cache after the first person requests it.
    > This causes a 3 minute delay before the user gets a response and the
    > session times out. Once in Cache the response is almost
    > instantanious.
    >
    > is there a way that i can load my cache so that the data is already
    > sitting in cache before the first user makes any web method requests?
    >
    > Global.asax on start only runs when the first user makes a request. I
    > need to it run before that.


    You could write a small console application that would issue the same web
    service request as the users do. Run it periodically, or when the system
    starts. In effect, you would be creating the first user. This user would
    still see the three minute delay; he just wouldn't complain about it!
    --
    --------------------------------------------------------------------------------
    John Saunders | MVP - Windows Server System - Connected System Developer
    John Saunders [MVP], Mar 1, 2008
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?M2Ry?=
    Replies:
    2
    Views:
    10,909
    Steven Cheng[MSFT]
    Sep 7, 2004
  2. Anup
    Replies:
    1
    Views:
    2,756
    Mark Rae
    May 9, 2006
  3. albert kao
    Replies:
    3
    Views:
    1,978
    Arne Vajhøj
    Feb 2, 2011
  4. Leo Violette
    Replies:
    0
    Views:
    998
    Leo Violette
    Apr 17, 2009
  5. Kai Geng
    Replies:
    0
    Views:
    176
    Kai Geng
    Dec 12, 2007
Loading...

Share This Page