Web Service (or Timer) Randomly Ending

Discussion in 'ASP .Net Web Services' started by philaphan80@yahoo.com, May 3, 2009.

  1. Guest

    I've built a .NET 2.0 web service and tied it into an ASP.NET 2.0 web
    application. The service includes a System.Timers.Timer that logs an
    entry to a SQL 2000 database every minute (60000 ms).

    Both were running fine within Visual Studio's native server on my
    local machine. Even after I closed the web page that triggered the
    service's timer to run, the timer would log entries indefinitely
    until
    I recompiled the code, changed the web.config file, or restarted the
    IIS service (as expected).

    I've now deployed the web service to a shared hosting environment
    (IIS
    is now out of my control) and I'm noticing that either the service
    *or* the timer are ending prematurely. Unfortunately, I haven't been
    able to find a pattern since it seems to end one time after 4
    minutes,
    the next 13, the next 7, etc. I'm not doing anything fancy here --
    just writing to a log. And I've added no new functionality between
    local testing and deployment.

    I'm able to log some events via Global.asax, but the service's
    "Application_End" event never seems to fire. This is what makes me
    suspect the timer as a possible culprit (hunch: service doesn't end,
    but timer does for some reason).

    First of all, is it possible for a timer to end while the service
    still runs? If so, is there an event or something I can trap to
    write
    something to my log *before* it ends? That will help me track this
    down better.

    Secondly, could an IIS setting in the shared environment (app pool?)
    be ending my service at random times? If so, any way to trap / work
    around it?

    I'm open to any insight or guidance.....
    , May 3, 2009
    #1
    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. Kelsang Wangchuk

    System.Timers.Timer vs. System.Threading.Timer

    Kelsang Wangchuk, Jul 31, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    703
    Kelsang Wangchuk
    Jul 31, 2003
  2. VR

    ending an async call to a web service

    VR, Sep 11, 2003, in forum: ASP .Net Web Services
    Replies:
    2
    Views:
    186
  3. kairos

    Web Service stops responding randomly

    kairos, Nov 1, 2006, in forum: ASP .Net Web Services
    Replies:
    3
    Views:
    436
    Steven Cheng[MSFT]
    Nov 2, 2006
  4. Leo Violette
    Replies:
    0
    Views:
    1,001
    Leo Violette
    Apr 17, 2009
  5. Gary W. Smith

    Web Service randomly hangs when being called from SOAP::Lite

    Gary W. Smith, Aug 4, 2009, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    880
    Gary W. Smith
    Aug 4, 2009
Loading...

Share This Page