How do you programmatically end a session in asp.net when Session.Abandon() doesn't work?
问题 Session.Abandon() doesn't seem to do anything. You would expect the Session_end event to fire when Session.Abandon() is called. 回答1: This is most likely because your SessionMode is not InProc (the only one that can detect when a session ends). Quoted from MSDN: Session Events ASP.NET provides two events that help you manage user sessions. The Session_OnStart event is raised when a new session starts, and the Session_OnEnd event is raised when a session is abandoned or expires. Session events