Dim ticket As FormsAuthenticationTicket = New
FormsAuthenticationTicket(1, _
EmpID.ToString, _
DateTime.Now, _
DateTime.Now.AddHours(12), _
chkRememberLogin.Checked, _
Roles)
Dim cookie As HttpCookie = New
HttpCookie(FormsAuthentication.FormsCookieName)
cookie.Value = FormsAuthentication.Encrypt(ticket)
If (chkRememberLogin.Checked) Then cookie.Expires =
ticket.Expiration ' do you have this line???
HTH,
Greg
"StanD" <St***@discussions.microsoft.com> wrote in message
news:41**********************************@microsof t.com...
At the end of my login process I am generating my own Persistent
FormsAuthentication ticket.
I encode this and set a cookie value. I then use
Response.Cookies.Add(cookie), and
I continue the login process. The cookie is not persisted across sessions
and does not appear in the cookie list on the client.
If I use SetAuthCookie persistence works. What am I missing here, in not
getting the desired effect with my own ticket?
--
StanD