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

Ask a Question related to ASP.NET Security, Design and Development.

  1. #1

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

    (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 ([url]http://www.dotnet247.com/[/url])

    <Id>3qm14zo67UO8QE8qvsGXwQ==</Id>
    May BA via .NET 247 Guest

  2. Similar Questions and Discussions

    1. Forms authentication doesn't work for downloads
      Hello, I'm using Forms authentication, and it works well. If user is not authenticated, he is routed to the login page. However, this doesn't...
    2. forms authentication doesn't work for static pages/files like GIF/HTML/PDF ?
      do I understand it correctly that forms authentication doesn't work for static pages/files like GIF/HTML/PDF ? so I cannot convince IIS to...
    3. Forms Authentication does not work when using computer name
      Greetings, My asp.net app is using Forms Authentication. Running the project from the Visual Studio .NET 2003 has absolutely no problem. I use...
    4. Forms Authentication timeout doesn't work
      I am trying to do some testing of my application with respect to timeouts (i.e. Session timeouts). I took the advice of somebody else in this...
    5. Unable to get Forms-based Authentication to work
      Hello, I'm new to ASP.NET, and I'm trying to learn how to implement forms based authentication. However, I don't know what I'm doing wrong....
  3. #2

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

    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" <anonymous@dotnet247.com> wrote in message
    news:eipelaekEHA.1904@TK2MSFTNGP09.phx.gbl...
    (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 ([url]http://www.dotnet247.com/[/url])

    <Id>3qm14zo67UO8QE8qvsGXwQ==</Id>


    Irishmaninusa Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139