'Session_End Event not fire

i want to have number of people is online. i wrote this code in Session_End :

    protected void ()
    {
        int online = int.Parse(HttpContext.Current.Application["Online"].ToString());
        online -= 1;
        HttpContext.Current.Application["Online"] = online;
    }

Session_End Event not firing and online value is same. The Session_Start works well and gave correct value, so i think problem is in Session_End Event.

Session_Start Code Is :

    protected void Session_Start()
    {
        int online = int.Parse(HttpContext.Current.Application["Online"].ToString());
        online += 1;
        HttpContext.Current.Application["Online"] = online;
        //After This Codes ,i add Visit Log Using user ip into database(may help)
    }


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source