I need to allow every single user have a personal session timeout. As I figured out the only one way to change timeout – Default.json. But this is not what I was looking for, because there I cant set multiple timeouts. Could you please help me with that?
There is only one session timeout in Default.json. You can handle the SessionTimeout event in your app and decide what to do and when to do it depending on your app logic. You can store any value you need in Application.Session: i.e.:
Application.Session.MyOwnTimeout = 40000; Application.Session.LastSessionTimeout = DateTime.Now;
The in your handler for Application.SessionTimeout, when your rule to timeout is reached, call Application.Exit(), otherwise simply set the Handled property to true and Wisej will NOT dispose the session.
You can decide what to do with the timeout by handling the Application.SessionTimeout event.
In ASP.NET a session timeout is not recoverable, it means the session has already been destroyed.
In Wisej the session timeout is only the timeout to fire the Application.SessionTimeout event. The default implementation shows the countdown form and then calls Application.Exit() which destroys the session.
In your case, I would leave the default session timeout in Default.json and then handle SessionTimeout event different for each user. When your code decides that the session has expired call Application.Exit(). If the user closes the browser Wisej will destroy the session according to the default timeout.
Please login first to submit.