You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Session.Clear or Abandon or RemoveAll don't clear all sessions. It only clears all values stored in the single current session.
In Wisej if you want to terminate a session or an application use Application.Exit(). If you stored something in the session object use Application.Session.Clear(). The Application.Session object is a dynamic object in Wisej but it also implements the IDictionary interface.
To close all open windows iterate the Application.OpenForms collection. However when you call Form.Close if your code handles FormClosing and cancels the form will not close. You can force it calling Close(CloseReason.ApplicationExit) but it's an internal method, you'd have to call it using reflection. We can make it public if needed.
Hi Jorge, you should use the method described by Luca below: iterate through Application.OpenForms and close them all. After closing all of them, Re-open the Login form (dim frm = new LoginForm(), frm.Show(),). You could also just not close the original login form but could hide it instead. So, you would iterate through Application.OpenForms closing each one, except if the form is the hidden login window (unhide /show it). Then go on to clear your session variables with Application.Session.Clear(). Does this make sense? -Levie
Activity
itg-assistant commentedon Jun 12, 2026
Luca answered 2017-08-15 15:52:19 UTC
Session.Clear or Abandon or RemoveAll don't clear all sessions. It only clears all values stored in the single current session.
In Wisej if you want to terminate a session or an application use Application.Exit(). If you stored something in the session object use Application.Session.Clear(). The Application.Session object is a dynamic object in Wisej but it also implements the IDictionary interface.
To close all open windows iterate the Application.OpenForms collection. However when you call Form.Close if your code handles FormClosing and cancels the form will not close. You can force it calling Close(CloseReason.ApplicationExit) but it's an internal method, you'd have to call it using reflection. We can make it public if needed.
itg-assistant commentedon Jun 12, 2026
Truong Nguyen answered 2017-08-15 16:02:24 UTC
I just need to clear all session values. Can Application.Session.Clear() dymanic method help it?
itg-assistant commentedon Jun 12, 2026
Jorge Bastos answered 2019-05-12 21:45:57 UTC
Hi,
Application.exit() does the job, but how can I do to to again to the login page after it?
Thanks in advanced,
itg-assistant commentedon Jun 12, 2026
Levie (ITG) answered 2019-05-12 21:52:44 UTC
Hi Jorge, you should use the method described by Luca below: iterate through Application.OpenForms and close them all. After closing all of them, Re-open the Login form (dim frm = new LoginForm(), frm.Show(),). You could also just not close the original login form but could hide it instead. So, you would iterate through Application.OpenForms closing each one, except if the form is the hidden login window (unhide /show it). Then go on to clear your session variables with Application.Session.Clear(). Does this make sense? -Levie
itg-assistant commentedon Jun 12, 2026
Jorge Bastos answered 2019-05-12 22:15:17 UTC
Found it!
“autoReload”: true,
in Default.json
itg-assistant commentedon Jun 12, 2026
Jorge Bastos answered 2019-05-12 22:19:02 UTC
Thanks Levie,
I’ve done it with the autoReload: True in default.json, works great,
It’s also a way of doing it right?