Forum Moderators: open

Message Too Old, No Replies

ASP.net redirect after logged in

         

hal12b

4:59 pm on Jun 18, 2010 (gmt 0)

10+ Year Member



I see this often and am wondering if something needs to be added to the web.config file.

What happens is this ->
If you click on a link to a page, but your session expired. You then log in, but are redirected to the page you were trying to access. I am not sure what the proper name is for this.

Any ideas where to implement it/what it's called?

Thanks - Hal

Ocean10000

7:15 pm on Jun 18, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Sounds like the standard Login setup. If it detects you are not logged in. It will redirect you to the login page, and set the return url to the page you left. Once you are successfully logged in, it redirects you back to the return url path, which is were you started.

Reference:
FormsAuthentication.RedirectFromLoginPage Method (String, Boolean) [msdn.microsoft.com]
Redirects an authenticated user back to the originally requested URL or the default URL.

hal12b

12:15 pm on Jun 21, 2010 (gmt 0)

10+ Year Member



Thanks! I'll review.