I’m about using WiseJ to create a multiuser application published on the Internet.
It has a login page where I redirect the users to once Application_SessionTimeout occurs. In this case I exit the app and create a new login form. So far so good.
What I want to prevent is to have multiple active but unused server sessions because of browsers which have the login page displayed but are not (currently) in use.
Therefore I have two solutions in mind:
Maybe you can tell me if the second option is possible to realize with WiseJ ?
Thank you.
You can kill the session calling Application.Exit. Once the session is killed, the server *only* sends back to the client the information that the session is gone. You can’t have a control without a session. The client cleans up everything and calls Wisej.onExit() on the global Wisej object.
You can assign your code in onExit and decide what to do. To reload the page and create a new session, which will show a new login scree, simply to do this:
https://wisej.com/support/question/how-to-show-a-logout-page-after-application-exit
This is the reference for IWisejCacheProvider.
https://wisej.com/docs/html/T_Wisej_Core_IWisejCacheProvider.htm
It is not related to this functionality. It’s useful only if you want to use a different cache manager. By default Wisej uses HttpRuntime.Cache.
Thanks for your answer. But I have no idea what I can do with “IWisejCacheProvider”. Is there more documentation about it somewhere? Do you think option 2 would be possible to implement with this?
When you get the session timeout, the session is *about* to timeout, it hasn’t timeout yet. If you want to “kill” the session use Application.Exit(). It will cause the session to get disposed and removed from the session manager. Or, after the real session timeout (which is the session timeout se in default.json * 2), the session is removed automatically. Session don’t remain in memory more than sessionTimeout * 2.
You can also implement a custom IWisejCacheProvider by implementing Wisej.Core.IWisejCacheProvider and adding the fully qualified class name as an application key in web.config using “Wisej.CacheProvider” as the key.
Please login first to submit.