M
May BA via .NET 247
(Type your message here)
I am working on ASP.NET project where I am using formauthentication, it seems to work fine on all OS including XPexcept on some XP machines in the department, I have been toldthat these machines are ghosted, which mean that they crashed inthe past, so they installed XP on them. The authentication isdeveloped using custom ticket authentication.
Dim strRoles As String = AssignRoles(USRole)
FormsAuthentication.Initialize()
Dim ticket As FormsAuthenticationTicket = NewFormsAuthenticationTicket( _
1, _
USID.ToString, _
DateTime.Now, _
DateTime.Now.AddMinutes(30), _
True, _
strRoles)
Dim hash As String =FormsAuthentication.Encrypt(ticket)
Dim cookie1 As HttpCookie = NewHttpCookie(FormsAuthentication.FormsCookieName, hash)
cookie1.Expires = ticket.Expiration
Response.Cookies.Add(cookie1)
One time I changed the authentication persistent attribute fromtrue to false, it seemed to work for a while but now it is notworking any more. I noticed that after the user login, theauthentication cookie was created, however; it is lost afterredirecting the user to another page. Also, it seems to workfine if I use
FormsAuthentication.SetAuthCookie(Username, True)
However; I need to use Custom Authentication cookie. Any Ideas?
I am working on ASP.NET project where I am using formauthentication, it seems to work fine on all OS including XPexcept on some XP machines in the department, I have been toldthat these machines are ghosted, which mean that they crashed inthe past, so they installed XP on them. The authentication isdeveloped using custom ticket authentication.
Dim strRoles As String = AssignRoles(USRole)
FormsAuthentication.Initialize()
Dim ticket As FormsAuthenticationTicket = NewFormsAuthenticationTicket( _
1, _
USID.ToString, _
DateTime.Now, _
DateTime.Now.AddMinutes(30), _
True, _
strRoles)
Dim hash As String =FormsAuthentication.Encrypt(ticket)
Dim cookie1 As HttpCookie = NewHttpCookie(FormsAuthentication.FormsCookieName, hash)
cookie1.Expires = ticket.Expiration
Response.Cookies.Add(cookie1)
One time I changed the authentication persistent attribute fromtrue to false, it seemed to work for a while but now it is notworking any more. I noticed that after the user login, theauthentication cookie was created, however; it is lost afterredirecting the user to another page. Also, it seems to workfine if I use
FormsAuthentication.SetAuthCookie(Username, True)
However; I need to use Custom Authentication cookie. Any Ideas?