[Gambas-user] Usage of session on web.gui

Marco Ancillotti gambas at servinfo.it
Mon Apr 17 09:48:17 CEST 2023


Hi all ,

I have a web.gui app that have a login screen.

I have a main form called login that ask for user and password , then if 
they are correct I do:

  WebForm.Current = MAIN
  LOGIN.Reload()

(MAIN is the real app form that load if you insert right user and password)

Everything works but after some time it refresh to login window ( LOGIN 
FORM ).
That can be correct but I want to manage timeout's by users names so I 
search and found session api.

On the login form after authentication I do:

   Session["username"] = "admin"
   Session.Timeout = 36000
   Session.Save()

And when a user click on a logoff button I do:

   Session.Abandon()
   Session.Save()
   WebForm.Current = LOGIN
   MAIN.Reload()

All work's as expected but timeout is always the same , ignoring what I 
put on session.timeout.

Anyone know what I do wrong ?

Thanks in advance,
Marco.





More information about the User mailing list