Question Logout user on Application crash

gate7cy

Well-known member
Joined
May 11, 2009
Messages
119
Programming Experience
3-5
I have developed a server-client application. The program has multiple users each uniquely login in with their credentials to the system. The problem arises when the application crashes, pc shuts/restarts, the user then cannot log in as it is showing is still logged in. This is true because the last code from the program, which logs out the users , is not run because the program crashed or the pc , that is intalled on, lost power. Is there a way to go around this problem. I cannot deploy the application until this is fixed. I have placed on application exit and on last form`s closing event to logout users. It still keeps them logged in in some cases as I already stated previously. Thanks for the replies
 
well, you could have a try catch block to catch the crashes. Then on the Catch part, you can put in your logout code (or execute the function(s) you have created to log the user out.
 
Back
Top