URGENT: FormsAuthentication.SetAuthCookie fails in IE6

Discussion in 'ASP .Net' started by Cirene, Jun 25, 2008.

  1. Cirene

    Cirene Guest

    FormsAuthentication.SetAuthCookie works fine in IE7, but not in IE6. Any
    idea why?

    Any alternative to FormsAuthentication.SetAuthCookie?

    Here's my code:

    FormsAuthentication.SetAuthCookie(Convert.ToString(Request("lexusername") &
    ""), True)

    Response.Redirect("customer/ViewCalendar.aspx")

    The ViewCalendar.aspx page is only for authenticated users. It keeps
    kicking me back to the login page even though the username password is
    correct. I know because this gives me TRUE:

    Membership.ValidateUser(Convert.ToString(Request("lexusername") & ""),
    Convert.ToString(Request("lexpassword") & ""))
    Cirene, Jun 25, 2008
    #1
    1. Advertising

  2. Sounds like it might be the secuirity settings of the browser; your code
    looks fine (at least as much as you have provided).
    Peter

    "Cirene" <> wrote in message
    news:%...
    > FormsAuthentication.SetAuthCookie works fine in IE7, but not in IE6. Any
    > idea why?
    >
    > Any alternative to FormsAuthentication.SetAuthCookie?
    >
    > Here's my code:
    >
    > FormsAuthentication.SetAuthCookie(Convert.ToString(Request("lexusername")
    > & ""), True)
    >
    > Response.Redirect("customer/ViewCalendar.aspx")
    >
    > The ViewCalendar.aspx page is only for authenticated users. It keeps
    > kicking me back to the login page even though the username password is
    > correct. I know because this gives me TRUE:
    >
    > Membership.ValidateUser(Convert.ToString(Request("lexusername") & ""),
    > Convert.ToString(Request("lexpassword") & ""))
    >
    >
    Peter Bromberg [C# MVP], Jun 25, 2008
    #2
    1. Advertising

  3. Cirene

    Cirene Guest

    I changed response.redirect to server.transfer and it worked. Any idea why?
    Thanks!

    "Peter Bromberg [C# MVP]" <> wrote in message
    news:...
    > Sounds like it might be the secuirity settings of the browser; your code
    > looks fine (at least as much as you have provided).
    > Peter
    >
    > "Cirene" <> wrote in message
    > news:%...
    >> FormsAuthentication.SetAuthCookie works fine in IE7, but not in IE6. Any
    >> idea why?
    >>
    >> Any alternative to FormsAuthentication.SetAuthCookie?
    >>
    >> Here's my code:
    >>
    >> FormsAuthentication.SetAuthCookie(Convert.ToString(Request("lexusername")
    >> & ""), True)
    >>
    >> Response.Redirect("customer/ViewCalendar.aspx")
    >>
    >> The ViewCalendar.aspx page is only for authenticated users. It keeps
    >> kicking me back to the login page even though the username password is
    >> correct. I know because this gives me TRUE:
    >>
    >> Membership.ValidateUser(Convert.ToString(Request("lexusername") & ""),
    >> Convert.ToString(Request("lexpassword") & ""))
    >>
    >>

    >
    Cirene, Jun 25, 2008
    #3
    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. fadi
    Replies:
    0
    Views:
    778
  2. Bill Henning
    Replies:
    8
    Views:
    9,511
    King Adrock
    Nov 9, 2005
  3. =?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:
    510
    =?Utf-8?B?bWF2cmlja18xMDE=?=
    Mar 23, 2006
  4. Cirene
    Replies:
    1
    Views:
    503
    Cirene
    Jun 30, 2008
  5. David Colliver

    Problem with FormsAuthentication and SetAuthCookie

    David Colliver, Jun 9, 2005, in forum: ASP .Net Security
    Replies:
    1
    Views:
    303
    David Colliver
    Jun 16, 2005
Loading...

Share This Page