Forms Auth Problems.
From: Ed Staffin (anonymous_at_discussions.microsoft.com)
Date: 04/23/04
- Next message: John Hamilton via .NET 247: "Sessions & SSL"
- Previous message: Kigunda Mbogo: "OWA and Form based login page"
- Next in thread: Ken Schaefer: "Re: Forms Auth Problems."
- Reply: Ken Schaefer: "Re: Forms Auth Problems."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Fri, 23 Apr 2004 05:12:05 -0700
Hi, I am using the fairly standard code below to do my
forms authentication ticket and redirect, however, I am
finding that once successfully logged in, I don't get
another log after I close the browser. Is there something
I need to do to let it know that if the browser closes
they should be logged out?
Thanks ... Ed
Dim tkt As FormsAuthenticationTicket
Dim cookiestr As String
Dim ck As HttpCookie
tkt = New FormsAuthenticationTicket(1, txtUserName.Text,
DateTime.Now(), DateTime.Now.AddMinutes(20),
True, "")
cookiestr = FormsAuthentication.Encrypt(tkt)
ck = New HttpCookie( _
FormsAuthentication.FormsCookieName(), cookiestr)
ck.Expires = tkt.Expiration
ck.Path = FormsAuthentication.FormsCookiePath()
Response.Cookies.Add(ck)
Resonse.Redirect(FormsAuthentication.GetRedirectUrl _
(txtUserName.Text, False))
- Next message: John Hamilton via .NET 247: "Sessions & SSL"
- Previous message: Kigunda Mbogo: "OWA and Form based login page"
- Next in thread: Ken Schaefer: "Re: Forms Auth Problems."
- Reply: Ken Schaefer: "Re: Forms Auth Problems."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|