sessionid available in session_end event? RRS feed

  • Question

  • User-1244278753 posted
    All: I store temporary settings in my DB and mark them by Session.SessionID, so that I can retrieve them based on the current user's session ID. With this thinking, I added code in my Session_End event in the global.asax.cs file to remove the items from the appropriate tables where it is related to the session id - for example: protected void Session_End(Object sender, EventArgs e) { string strSQL = strSQL = "DELETE FROM sometable WHERE the sometable.sessionID = '" + Session.SessionID.ToString() + "'"; Common.ExecuteSQL(strSQL); } Only thing is, it doesn't clear out. Is the Session.SessionID still a valid object in the session_end event? Is there anything to check to make sure this event is firing, and if not, how does one make it fire? Thanks!
    Tuesday, August 26, 2003 11:08 PM

All replies

  • User2032526919 posted
    Session_End fires only if your session state is in InProc mode. I believe your questions are answered here mostly: Session FAQ
    Thursday, August 28, 2003 4:17 PM