Forms Authentication and session timeout

G

goscottie

I have web project that doesn't require strict authentication. So I
put a persistent Forms Authentication so that user can come back any
time and doesn't have to log in (authentication timeout set to
something big, like 300000). So far so good. Problem occurs when
user closes the browser, thus killing the session and losing
Session["UserId"] which I use extensively throughout the application.
Only workaround I see is that to create a custom FormsAuthentication
ticket and include the UserID there and restore to Session["UserId"].
Questions..

1. Is there another way around? To keep user identity handy even
after browser was closed and prevent user from login again.
2. Where can I (which method or event) attempt to restore the Session
value so that I only have to do this once.

TIA.
 

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,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top