SetAuthCookie works, but our cookies aren't being written - HELP

Discussion in 'ASP .Net' started by =?Utf-8?B?VHlzb24gQnJvd24=?=, May 3, 2004.

  1. All

    We recently started writing a couple encrypted values to the user's cookie using FormsAuthentication.Encrypt. Such as:
    Dim tmpTicket1 As New FormsAuthenticationTicket(1, "TEST", Date.Now, Date.Now.AddMinutes(60), False, "Boom1")
    Dim tmpResults1 As String = FormsAuthentication.Encrypt(tmpTicket1)
    Response.Cookies.Add(New HttpCookie("TEST", tmpResults1))

    And then we are reading it like:
    Request.Cookies("TEST")

    BUT - we are noticing that in some cases, people who *do* accept session cookies (confirmed because their cookie session works and FormsAuthentication.SetAuthCookie works) do *NOT* accept our non persistant cookie. The frustrating thing is that we cannot recreate the issue, so I grasping at straws.

    Is there anything glaringly wrong with the code listed above? Further, how exactly is ASP.NET setting the cookie through SetAuthCookie that sticks, but ours don't stick?

    Thanks!

    Tyson
     
    =?Utf-8?B?VHlzb24gQnJvd24=?=, May 3, 2004
    #1
    1. Advertising

  2. =?Utf-8?B?VHlzb24gQnJvd24=?=

    jack Guest

    I have the same Problem.

    If you find an answer let me know please!

    "Tyson Brown" <> wrote in message
    news:...
    > All,
    >
    > We recently started writing a couple encrypted values to the user's cookie

    using FormsAuthentication.Encrypt. Such as:
    > Dim tmpTicket1 As New FormsAuthenticationTicket(1, "TEST", Date.Now,

    Date.Now.AddMinutes(60), False, "Boom1")
    > Dim tmpResults1 As String = FormsAuthentication.Encrypt(tmpTicket1)
    > Response.Cookies.Add(New HttpCookie("TEST", tmpResults1))
    >
    > And then we are reading it like:
    > Request.Cookies("TEST")
    >
    > BUT - we are noticing that in some cases, people who *do* accept session

    cookies (confirmed because their cookie session works and
    FormsAuthentication.SetAuthCookie works) do *NOT* accept our non persistant
    cookie. The frustrating thing is that we cannot recreate the issue, so I
    grasping at straws.
    >
    > Is there anything glaringly wrong with the code listed above? Further, how

    exactly is ASP.NET setting the cookie through SetAuthCookie that sticks, but
    ours don't stick?
    >
    > Thanks!
    >
    > Tyson
     
    jack, May 4, 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. Replies:
    2
    Views:
    432
    bruce barker
    Jan 5, 2005
  2. =?Utf-8?B?bWF2cmlja18xMDE=?=

    SetAuthCookie works some times and fails some times?

    =?Utf-8?B?bWF2cmlja18xMDE=?=, Mar 23, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    544
    =?Utf-8?B?bWF2cmlja18xMDE=?=
    Mar 23, 2006
  3. douha
    Replies:
    1
    Views:
    320
    Toby Inkster
    Jan 4, 2007
  4. _Who
    Replies:
    7
    Views:
    2,753
  5. Mel
    Replies:
    2
    Views:
    94
    Alvaro G Vicario
    Mar 17, 2005
Loading...

Share This Page