Application object lifetime

Discussion in 'ASP .Net Web Services' started by Paolo Pagano, Jul 22, 2003.

  1. Paolo Pagano

    Paolo Pagano Guest

    Hi,

    how can I control the Application's life time in a service like:

    public class MyService : System.Web.Services.WebService
    {

    [WebMethod] public int Ping()
    {
    Application.Lock();

    int count = Convert.ToInt32( Application[ "PING_COUNT" ] ) + 1;
    Application[ "PING_COUNT" ] = count;

    Application.UnLock();

    return count;
    }
    }

    after FEW minutes "PING_COUNT" is resetted: I think the Application is
    restarted.
    Can I control this from my WebService and/or from IIS settings?

    NOTE that Session timeout in IIS for this application (virtual directory) is
    20 minutes.


    thanxx,
    Paolo
    Paolo Pagano, Jul 22, 2003
    #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. Bruce W.1
    Replies:
    1
    Views:
    312
    Alvin Bruney [MVP]
    Jan 29, 2004
  2. Colin Basterfield

    lifetime of Session object

    Colin Basterfield, Jun 2, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    430
    Colin Basterfield
    Jun 3, 2004
  3. Replies:
    0
    Views:
    406
  4. Sashko
    Replies:
    1
    Views:
    726
    Joerg Jooss
    Jun 22, 2006
  5. Chris
    Replies:
    1
    Views:
    383
    Nick Gilbert
    Jun 4, 2010
Loading...

Share This Page