[SOLVED] Application.Session and redirection


Hello Wisej team,


1 Is Wisej version of session (Application.Session) works differently than asp.net session (HttpContext.Current.Session)? and why?

In Desktop based application, I noticed that Application.Session get cleared/destroyed when new same page is opened in browser while HttpContext.Current.Session preserve the state as intended.


2. Let say I have a HttpHandler : IHttpHandler which deals with some specific POST requests and needed to redirect to another (home) page in some cases. What would be the best practice to redirect the request?

The problem is that right now I use HttpContext.Current.Response.Redirect(“/”, false); but it works fine only if the page was not loaded. In cases if it’s loaded already (Load event triggered), Redirect method does not fire Load event again. How would I be able to redirect the request and interact with Wisej UI after it?

I also tried to use Wisej Application.Navigate(“/”) in httphandler, but it does nothing


(I’m aware of usage HttpHandlerRequiresSession if it matters)




  • You must to post comments
Best Answer

1. We don’t use the AspNet session. AspNet session uses cookies and cannot be isolated by browser tabs. It doesn’t fire any event when it is about to expire. It’s not dynamic. It’s unsafe.

Wisej session cannot be spoofed. It doesn’t use cookies. Cannot be shared between tabs. It’s dynamic. If you are trying to use the same Wisej session in different tabs it will not work by design.


2. You cannot redirect from “/“ to “/“. It’s the same URL. You are confusing the Load event in Aspnet with the Load event in Wisej. It has nothing to do with the browser load or reload.

Wisej is not Aspnet and Wisej pages are not aspnet pages.

if you put together a small sample showing what you are trying to do we may be able to help you further.

  • M M
    • M M
    • May 28, 2019 - 12:44 pm
    Thanks for your reply! However, I could figure all out during the day. I was doing redirection from other Url than just “/”. I ended up clearing session storage on client side (to remove Wisej.SessionId) by simply calling Wisej.Core.removeSession() Without Wisej.SessionId Wisej triggered to fully reload on next request
  • Luca (ITG)
    That causes the creation of a new server session on each reload. The Load event is fired when the Page/Form/Desktop are created. If you need to handle the browser refresh event there is the Application.ApplicationRefresh event.
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.