Re: Forms authentication - seems to log out every once in a while.
- From: "Mufasa" <jb@xxxxxxxxxxx>
- Date: Mon, 4 Jun 2007 11:28:49 -0400
OK color me embarrassed.
How do I do that? Just the FormsAuthenticationTicket code and the add
cookies code?
TIA - ( a pretty embarrassed ) Jeff.
"bruce barker" <nospam@xxxxxxxxxx> wrote in message
news:ut586srpHHA.3252@xxxxxxxxxxxxxxxxxxxxxxx
you need to update the cookie timeout on every page request, not just at
login.
-- bruce (sqlwork.com)
Mufasa wrote:
In my website, we are using forms authentication. But every once in a
while, it will seem to log you out suddenly when your in the middle of
doing something.
In my login page, I do the following code once the person has logged in
successfully:
FormsAuthentication.Initialize()
'The AddMinutes determines how long the user will be
logged in after leaving
' the site if he doesn't log off.
Dim fat As FormsAuthenticationTicket = New
FormsAuthenticationTicket(1, tbUserID.Text, DateTime.Now, _
DateTime.Now.AddMinutes(30), True, lsRole,
FormsAuthentication.FormsCookiePath)
Response.Cookies.Add(New
HttpCookie(FormsAuthentication.FormsCookieName, _
FormsAuthentication.Encrypt(fat)))
Is there anything else I need to do or will this take care of it.
TIA - Jeff.
.
- References:
- Forms authentication - seems to log out every once in a while.
- From: Mufasa
- Re: Forms authentication - seems to log out every once in a while.
- From: bruce barker
- Forms authentication - seems to log out every once in a while.
- Prev by Date: Re: Breaks in labels
- Next by Date: Changing from Server.Transfer to Response.Redirect.
- Previous by thread: Re: Forms authentication - seems to log out every once in a while.
- Next by thread: On postback, EVENTTARGET is populated but IsPostback == false, no events fire?!
- Index(es):
Relevant Pages
|