I'm working on an e-commerce site, Some of the information to identify the user are stored in session variables.
What happens is that if customer logs in at 16:00 and session variables have a timeout of two hours ,At 18:00, no matter what he is doing, he will be disconnected.
This could create problems for the client while he is making an order.
Even extending the lifetime of variables to 8 hours, there is the possibility that the client reconnects at 23:55 (almost 8 hours after 16:00) and he will be disconnected after only 5 minutes of browsing.
What I'm trying to find out is if there is a way to extend the duration of the current session for each connection.
For example: (It is assumed that on each page there is the code to extend the duration of the session)
the session expires every 30 minutes.
user1 connects at 16:00.
the session will expire at 16:30.
user1 enters the shopping cart page at 16:02
the session will expire at 16:32.
user1 enters the home page at 16:04
the session will expire at 16:34.
and so on ..
if user1 does not open any page for 30 minutes will be disconnected.
Currently I built the whole system in vb.net and I was able to extend the duration of the session variables (only starting from the first variable declaration) with the command Session.Timeout = 60
But I could not find a way to dynamically extend it.