I want to store a variety of session variables across multiple applications, but for an anonymous user.
However, I occasionally want to reset these variables. Is there a way of resetting / wiping the session variables for the anonymous user, beyond manually setting them all in actions? If it was an OS user I could end the session - can i 'end' the anonymous session?
I should mention I am aware of the 3-year old forum post which asked this same question, but I'm looking for other input in case that it was outdated or incorrect.
Thanks!
You can use this component:
https://www.outsystems.com/forge/component-overview/1365/browser-session-timeout
To clear a session, even for an anonymous user. I did a quick test, and It clears the value of OutSystems Session Properties back to their default value when you call its ClearSession action.
Be aware that if you have any UI elements relying on the Session properties, you'll need to either refresh the page, or use an Ajax Refresh to update the UI with the changed values.
Thanks! I try to avoid using unofficial things from the forge, but having a poke through this one showed exactly what I needed.
This feels more 'correct' than deleting the ASP.NET_Session cookie from the browser haha
MichaelR wrote:
And if you're comfortable enough to read through what a .NET extension is doing, you're probably well on your way to being able to create your own extension, if you run into other things that you need to do in .NET code.