forms authentication & session timeout

T

Tomk

I'm using forms authentication in an ASP.NET application. If I am on a page
that requires authentication and my session timesout I am returned to the
login page. Isn't it supposed to take me back to the page where the timeout
happened after I login?
 
M

Mark Fitzpatrick

Is there a return variable in the querystring called ReturnURL when you are
taken to the login page? IF so, then when the user is authenticated you'll
call the FormsAuthentication.RedirectFromLogin method to create the login
creadentials and return to the URL specified in the querystring.

Hope this helps
Mark Fitzpatrick
Microsoft MVP - FrontPage
 
G

Guest

I have had the same problem
In my case I added some code to the login pag

If (Session.IsNewSession = False) And (Not IsPostBack) The
' display message to user about session timeout
End I

Now when people end up back at the login due to a time out they at least know why

Davi
----- Ted wrote: ----

I have a related issue I think. Once a session has timed out, can that fact be captured somehow so that an error msg can be displayed on the login screen? The first time a user hits the login page there should be no error msg, but if they are redirected to due a timeout, I want to show a message explaining what happened

Perhaps modifying one the http handlers

thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top