NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: HPabon on June 28, 2012, 08:18:14 PM

Title: Delete session data from file if user doesn't use log out
Post by: HPabon on June 28, 2012, 08:18:14 PM
Hi all,

How to delete session data from a TPS file if the user
doesn't click the log out button?

Regards

Hector
Title: Re: Delete session data from file if user doesn't use log out
Post by: Rob de Jager on June 28, 2012, 09:19:17 PM
Hi Hector,

You won't know if the user has left the browser, so the only way to destroy sessions in this case is to set the session expiry time.

The "Session Timeout" is a template option - WebServer procedure / Settings / Advanced tab

Cheers


Rob
Title: Re: Delete session data from file if user doesn't use log out
Post by: HPabon on June 29, 2012, 06:48:25 AM
Hi Rob,

I don't think session time-out will work here, as closing the browser is not the normal flow when you do a log in. 

Then, consider the PC OS freezing and user has to reboot. That is like closing abruptly the browser.

Closing the browser without log in out is not a normal event or processing. And I need to clean what ever data is in the file for that session or user after a non-normal session closing.

If its there no way to clean files when the user does not log out and simply close the browse, then garbage will stay for ever in the file.

Hector

Title: Re: Delete session data from file if user doesn't use log out
Post by: Bruce on June 30, 2012, 03:45:37 AM
There is a DeleteSession method in the WebHandler Hector, so you should add your custom cleanup tere, before the parent call.