Z
z. f.
Hi,
i use Forms authentication in my vb.net asp web application
on the login page i set the authentication cookie, and i can see the cookie
is there.
on the Global_AuthenticateRequest
i get the IsNothing(HttpContext.Current.User) = true
why the framework don't recognise my cookie?
the code to put the cookie is:
FormsAuthentication.Initialize()
Dim ticket As FormsAuthenticationTicket = New FormsAuthenticationTicket( _
1, userId, _
DateTime.Now, DateTime.Now.AddMinutes(Session.Timeout), _
False, roles)
Dim hash As String = FormsAuthentication.Encrypt(ticket)
Dim cookie As HttpCookie = New
HttpCookie(FormsAuthentication.FormsCookieName, hash)
' Add the cookie to the list for outgoing response
Page.Response.Cookies.Add(cookie)
i use Forms authentication in my vb.net asp web application
on the login page i set the authentication cookie, and i can see the cookie
is there.
on the Global_AuthenticateRequest
i get the IsNothing(HttpContext.Current.User) = true
why the framework don't recognise my cookie?
the code to put the cookie is:
FormsAuthentication.Initialize()
Dim ticket As FormsAuthenticationTicket = New FormsAuthenticationTicket( _
1, userId, _
DateTime.Now, DateTime.Now.AddMinutes(Session.Timeout), _
False, roles)
Dim hash As String = FormsAuthentication.Encrypt(ticket)
Dim cookie As HttpCookie = New
HttpCookie(FormsAuthentication.FormsCookieName, hash)
' Add the cookie to the list for outgoing response
Page.Response.Cookies.Add(cookie)