SessionEnd responded when a User Session times out - State Management System

Q.  When a User’s Session times out which event should you respond to?
- Published on 27 Jul 15

a. Application_Start
b. Session_End
c. Session_Start
d. Application_End

ANSWER: Session_End
 

    Discussion

  • Raj   -Posted on 01 Oct 15
    Session_End event will be fire When a User’s Session times. This event works only if session mode is InProc. If session mode is StateServer or SQLServerthen this evnt will not work.
    In Global.asax file you can write Session_End as follows
    void Session_End(object sender, EventArgs e)
    {
    // Code that runs when a session ends.
    }

Post your comment / Share knowledge


Enter the code shown above:
 
(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)