Hi all,
i am creating a website and i want to log out the user after 30 mins of inactivity. how do i do this using vb.net.
define a public variable:
each time the user does something
have a Timer or a Do/DoEvents/Loop with
- if T > timer +30 then
-
'logout code
-
end if
Also, if the user tries to login and not getting through. after 3 tries i want the system to lock the user out and after 10 mins the user can try again.
can any1 help me?
in your login code
- dim i as integer
-
dim s as single
-
if login = false then
-
i = i+1
-
if i = 3 then
-
buttonAccept.enabled=false
-
t=timer
-
end if
-
end if
and in a timer or a loop, just check that 10 minutes later, the enabled will be true again.
But remember, if the explorer is closed and oppened again, this will be reseted, and your method wont do.
Actually, i dont think i can imagine a good method to solve this very problem. unless you block the user, but this way, any bad guy will be able to block any other users, that'll be rude, wouldnt it?