How to redirect user to the last visited page (i.e. page where the session got expired)

Posted by Balajikasiraj01 under ASP.NET on 4/21/2015 | Points: 10 | Views : 520 | Status : [Member] | Replies : 0
down vote
I have developed an ASP.Net web application and using windows authentication. I have 20 UIs (.aspx pages) in the different file path (folder structure i.e. 4 UIs will under a folder, other 4 will be under another folder etc,). This application runs mainly in Internet Explorer browser.

Whenever session times out, have to redirect user windows authentication page which prompts a user to enter username and password via window authentication.
Once user re-enters into an application (after session expiration and again login via window authentication), how to redirect a user to the last visited page ( an i.e. page where the session got expired)?
Am trying to use session variable, but whenever session times out, session value also gets cleared.

We need to windows authentication based on restricted UI. Authorized System username only access all UIs. Otherwise, we restricted some UIs. When user credential after successful authentication, we have checked the system user name and get its role from the database and we redirect some Home UI.

But after time-out we recreate the authentication prompt in our application and redirect to any constant page (also check role). But now we want when session timeout and after authentication redirect to the last visited page (last session visited page).


(No response found.)

Login to post response