Click here to Skip to main content
15,887,683 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi there everyone, i have a question on my mind that i can't solved by my own so i'm asking anyone of you here guys can help me. my question is this, is it possible in vb.net 2010 to trace or track the computer when it automatically shutdown or it accidentally shutdown by itself? because i have a code in my login form which is when the user log into the main form,other users can't log to that form.i've set some condition on my table to this form.it works perfectly but then,it came up to my mind that what if the computer turned off by itself accidentally or it restarted by someone and the condition on my table is still true.then the users cant login anymore because its true.

is there a way for my question or an alternative way for my code?

thanks guys!
Posted

1 solution

User sessions (because that's what you're actually tracking) should timeout after a certain period. So it's best to keep the session active by updating it regularly with a LastActivityDate. That way, a session could expire after one hour of no activity, and the user can login again after that period.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900