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.
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?
3 5593 kadghar 1,295
Recognized Expert Top Contributor
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?
Hi,
the code that posted does nothing. do you have any other ideas that may help?
kadghar 1,295
Recognized Expert Top Contributor
Hi,
the code that posted does nothing. do you have any other ideas that may help?
the code gives the main idea. actualy im not sure what Time functions the newer versions of VB have, and of course your controls and variables names can be different.
why dont you check that out?
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Daniel Bengs |
last post by:
Hi there...
I've got a problem where a normal string variable loses its value after
session_start() is called. The funny thing is, that this only happens
for some people, and they are using IE6, but it does not happen with all
versions of IE6. I've tested myself only with Mozilla and IE5, but the
problem does not occur for me.
I've got a...
|
by: Ryan Hubbard |
last post by:
I would like to limit multiple logins for a user. How and when does
the session id expire? Can I set it so after x minutes of inactivity
it would expire. How do I check if session id exists? If I can do
these two things then I can store the session id for a user in a
database and everytime he requests an action I can just check if the...
|
by: Alvin Bruney |
last post by:
I'd like to prompt the user that their session is about to time out and give
them the option to keep the session alive. Any ideas?
By the time the session end event fires, the session is already ended so
putting up a javascript box won't make sense since there is no session.
I thought of client side which is good in theory but the only...
|
by: Florian Zimmermann |
last post by:
Hi everyone,
we have configured our IIS and the specific website to use 60 mins for
session timeout. Additionally we configured the web.config so that timeout
in the sessionState section is set to 60 as well. Regardless of this
settings, the session gets abandoned after about 30 mins. Are there any
other places that can impact the timeout...
|
by: jsale |
last post by:
I'm currently using ASP.NET with VS2003 and SQL Server 2003. The ASP.NET app
i have made is running on IIS v6 and consists of a number of pages that allow
the user to read information from the database into classes, which are used
throughout the application. I have made class collections which, upon reading
from the DB, create an instance of...
| |
by: bdeviled |
last post by:
I am deploying to a web environment that uses load balancing and to insure
that sessions persist across servers, the environment uses SQL to manage
sessions. The machine.config file determines how all applications will use
sessions and to insure that all application use this method, the session
properties cannot be overriden.
Within the...
|
by: whatanut |
last post by:
Hi,
we have a website built using .Net Framework 2 and Visual Studio
2005 Beta 2. It has a session timeout setting of 20 minutes of
inactivity, set in the web.config. But some of our users are timing out
sooner than 20 minutes (5 minutes even). Any idea why this may be
happening to some but not others and what we can do to fix it?
thanks,.
|
by: Tim Reynolds |
last post by:
Team,
I am developing a web service. In testing in on my enw PC, I am expecting to
see exceptions thrown appear on my browser. Instead I am getting an HTTP 500
Internal Server Error page and I am not seeing my exception details. The
web.config file being used has the setting <customErrors mode="Off"/>. This
should allow me to see the...
|
by: David Gillen |
last post by:
Hi.
I've 2 requirements
- session will end when browser is closed
- session will end after 90 minutes inactivity.
Now, from the documentation session.cookie-lifetime when set to 0 _should_
cause the session to end when the browser is closed, although at the moment
this doesn't appear to be the case for me. So, question one, can something...
|
by: anithaapr05 |
last post by:
Hi,
I am creating a session when user successfully login to the site and user gets a form to input some data into database.
Assume that user entered data into some fileds and let the browser ideal and doing some other work in his/her system.
My requrement is, 2 mins before(after 13 mins) of session timeout(I set session timeout as 15...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
| |