ASP.NET Forms Authentication don't work on some Window XP

Discussion in 'ASP .Net Security' started by May BA via .NET 247, Sep 3, 2004.

  1. (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?



    --------------------------------
    From: May BA

    -----------------------
    Posted by a user from .NET 247 (http://www.dotnet247.com/)

    <Id>3qm14zo67UO8QE8qvsGXwQ==</Id>
     
    May BA via .NET 247, Sep 3, 2004
    #1
    1. Advertising

  2. did you ever get this sorted out. Reason for asking is because I have seen
    this in a site I am currently working on. On the server I can't get past the
    login screeen. Yet while working on the site in VS.NET it allows me to
    continue on. And at one point if I tried to access the site from the server
    itself it would log me in, but that is no longer the case now. So I saw your
    problem down below and was wondering if you had solved it or not.

    "May BA via .NET 247" <> wrote in message
    news:...
    (Type your message here)
    I am working on ASP.NET project where I am using form authentication, it
    seems to work fine on all OS including XP except on some XP machines in the
    department, I have been told that these machines are ghosted, which mean
    that they crashed in the past, so they installed XP on them. The
    authentication is developed using custom ticket authentication.

    Dim strRoles As String = AssignRoles(USRole)
    FormsAuthentication.Initialize()

    Dim ticket As FormsAuthenticationTicket = New
    FormsAuthenticationTicket( _
    1, _
    USID.ToString, _
    DateTime.Now, _
    DateTime.Now.AddMinutes(30), _
    True, _
    strRoles)

    Dim hash As String = FormsAuthentication.Encrypt(ticket)
    Dim cookie1 As HttpCookie = New
    HttpCookie(FormsAuthentication.FormsCookieName, hash)

    cookie1.Expires = ticket.Expiration
    Response.Cookies.Add(cookie1)




    One time I changed the authentication persistent attribute from true to
    false, it seemed to work for a while but now it is not working any more. I
    noticed that after the user login, the authentication cookie was created,
    however; it is lost after redirecting the user to another page. Also, it
    seems to work fine if I use

    FormsAuthentication.SetAuthCookie(Username, True)

    However; I need to use Custom Authentication cookie. Any Ideas?



    --------------------------------
    From: May BA

    -----------------------
    Posted by a user from .NET 247 (http://www.dotnet247.com/)

    <Id>3qm14zo67UO8QE8qvsGXwQ==</Id>
     
    Irishmaninusa, Sep 23, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Eric
    Replies:
    2
    Views:
    1,497
    Tommy
    Feb 13, 2004
  2. Henri
    Replies:
    0
    Views:
    351
    Henri
    Oct 12, 2004
  3. =?Utf-8?B?bWF2cmlja18xMDE=?=

    Forms Authentication Fails some times and not some times???

    =?Utf-8?B?bWF2cmlja18xMDE=?=, Mar 28, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    495
    =?Utf-8?B?bWF2cmlja18xMDE=?=
    Mar 28, 2006
  4. Eric
    Replies:
    2
    Views:
    557
  5. Gilles T.
    Replies:
    1
    Views:
    168
    Jim Ley
    Jan 18, 2004
Loading...

Share This Page