forms authentication question
From: z. f. (zigi_at_info-scopeREMSPAM.co.il)
Date: 11/28/04
- Next message: Paul Glavich [MVP - ASP.NET]: "Re: Deligation issue"
- Previous message: Hayato Iriumi: "Re: history.back not working"
- Next in thread: Hernan de Lahitte: "Re: forms authentication question"
- Reply: Hernan de Lahitte: "Re: forms authentication question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Sun, 28 Nov 2004 10:37:36 +0200
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)
- Next message: Paul Glavich [MVP - ASP.NET]: "Re: Deligation issue"
- Previous message: Hayato Iriumi: "Re: history.back not working"
- Next in thread: Hernan de Lahitte: "Re: forms authentication question"
- Reply: Hernan de Lahitte: "Re: forms authentication question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|