关闭或关闭计算机 [英] shutdown or turned off computer

查看:77
本文介绍了关闭或关闭计算机的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,我有一个问题在于我无法解决的问题,所以我问你们这里有人可以帮助我。我的问题是,在vb.net 2010中是否有可能在计算机自​​动关闭或意外关闭时跟踪或跟踪计算机?因为我的登录表单中有一个代码,当用户登录主表单时,其他用户无法登录到该表单。我已经在我的表上设置了一些条件到这个表单。它工作得很好然后,它我突然意识到如果计算机意外关闭或者某人重新启动并且我的桌子上的情况仍然是真的那么该怎么办呢。然后用户再也无法登录,因为它是真的。



有没有办法解决我的问题或替代方法?



谢谢大家!

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!

推荐答案

用户会话(因为那是你实际跟踪的内容)应该在一段时间后超时。因此,最好通过LastActivityDate定期更新会话来保持会话处于活动状态。这样,会话可以在一小时没有活动后到期,并且用户可以在该时段之后再次登录。
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.


这篇关于关闭或关闭计算机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆