Session_End is not protected from fire - if you do not use InProc sessions, for example, it does not work at all. If your application restarts or dies, it does not work again.
It would be best to have this code in a generic method that you can call from numerous places:
- In LoginStatus you can set LoggingOut - Call your method out there to deal with people who come out of the system is reasonable.
- If you are using InProc sessions in your Session_End session, but make sure you check to see if they have already been logged out (as you saw).
- InProc, . , , (, Session_Start, ), , , ( ).
, , :
GetNumberOfUsersOnline
" , ". - , , :
GetAllUsers
FindUsersByName
FindUsersByEmail
, , " " .
MembershipUser, IsOnline - LastLogonDate LastActivtyDate - - , , , .