forms authentication question

From: z. f. (zigi_at_info-scopeREMSPAM.co.il)
Date: 11/28/04


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)



Relevant Pages

  • Re: DESPERATE: FormsAuthentication Problem
    ... > them in the forms authentication cookie. ... > ' Get ";" delimited string of the user's roles from the database ... > Dim authTicket As FormsAuthenticationTicket = New ...
    (microsoft.public.dotnet.framework.aspnet)
  • DESPERATE: FormsAuthentication Problem
    ... them in the forms authentication cookie. ... from the forms authentication cookie, create a new FormsIdentity object, ... ' Get ";" delimited string of the user's roles from the database ... Dim authTicket As FormsAuthenticationTicket = New ...
    (microsoft.public.dotnet.framework.aspnet)
  • DESPERATE: FormsAuthentication Problem
    ... them in the forms authentication cookie. ... from the forms authentication cookie, create a new FormsIdentity object, ... ' Get ";" delimited string of the user's roles from the database ... Dim authTicket As FormsAuthenticationTicket = New ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: DESPERATE: FormsAuthentication Problem
    ... >>> database and create a semicolon delimited string listing the roles ... >>> them in the forms authentication cookie. ... >>> Dim authTicket As FormsAuthenticationTicket = New ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: DESPERATE: FormsAuthentication Problem
    ... I have verified that both machines are running the same version of the ... >> them in the forms authentication cookie. ... >> ' assigned a semicolon delimited string of role names. ...
    (microsoft.public.dotnet.framework.aspnet)