Application object lifetime

P

Paolo Pagano

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top