protected void Application_Start(Object sender, EventArgs e)
{
Application["Sessions"] = 0;
}
protected void Session_Start(Object sender, EventArgs e)
{
Application.Lock();
Application["Sessions"] = (int) Application["Sessions"] + 1;
Application.UnLock();
}
protected void Application_BeginRequest(Object sender, EventArgs e)
{
}
protected void Application_EndRequest(Object sender, EventArgs e)
{
}
protected void Application_AuthenticateRequest(Object sender, EventArgs e)
{
}
protected void Application_Error(Object sender, EventArgs e)
{
}
protected void Session_End(Object sender, EventArgs e)
{
Application.Lock();
Application["Sessions"] = (int) Application["Sessions"] - 1;
Application.UnLock();
}
protected void Application_End(Object sender, EventArgs e)
{
}
Problem je u tome sto kad procitam promenljivu Application["Sessions"] to uvek bude broj sesija od startovanja aplikacije, sto ce reci kao da se uopste ne izvrsava funkcija Session_End(...). U cemu je problem? Da li je potrebno nesto posebno podesavati u IIS-u.
hvala gorann
gnastic