Hi Wisej Team,
I’m looking for a technique in order to get the online users in my Wisej app.
any idea?
Thanks
Orel.
Hi again Orel,
Please have a look at Session documentation.
When the user closes the browser, or shuts down the computer, or loses power, or loses the connection, the result for Wisej is the same: it stops receiving keep-alive messages from the client. When that happens, the session expiration timer starts to tick and after the specified timeout (which is the value specified in Default.json or the default) times 2, Wisej drops the session and disposes all the associated object.
After closing the browser, Wisej will wait 2 x 120 seconds (if you didn’t change sessionTimeout on the json file). Then the application exits and session counter is decreased.
You can use the debugger or a logger like NLog to see what’s happening and when it’s happening.
Hi Orel,
Authentication and online users are application concepts. So that’s up to your application to solve.
Neverthless Wisej can tell you how many sessions are active:
Snippet
Application.SessionCount
[Edit]
To help you keep track of users that didn’t logout but are no longer online (closed the browser, etc) you have the event
Snippet
Application.ApplicationExit
Please login first to submit.