Forms Authentication without a Cookie?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Harry Whitehouse

    #1

    Forms Authentication without a Cookie?

    I've got a fairly simple forms authentication project (a login page and a
    single secure page), but a number of users (~25%) can't seem to get past the
    login.aspx step. I theorized that this might have to do with their
    browser's cookie setting.

    I had been using cookies to store session state and logon parameters (user
    option), but I completely eliminated them using the SQLServer session
    management approach. But now, with my test browser set on "prompt" for
    cookies, I still get a message that my login page is trying to set a cookie.

    I gather it's from this statement:

    FormsAuthentica tion.RedirectFr omLoginPage(Use rSerialNo.Text,
    false);

    If I accept the cookie, I move on to the secure page. If I don't, I end up
    staying on the login.aspx page. I think that's what might be happening with
    some of the users who attempt to access this page (even though most say
    their browsers accept cookies).

    Any thoughts here? Is there any way to have an authentication scheme
    without cookies? Might something else be throwing my users?

    TIA

    Harry


  • Steve C. Orr, MCSD

    #2
    Re: Forms Authentication without a Cookie?

    In your web.config file, in your sessionState tag, set the attribute
    cookieless="tru e"

    --
    I hope this helps,
    Steve C. Orr, MCSD

    --------------------------------
    Hire top notch developers to get your projects done right:

    --------------------------------



    "Harry Whitehouse" <harry@envmgr.c om> wrote in message
    news:%23tBWQieZ DHA.2592@TK2MSF TNGP09.phx.gbl. ..[color=blue]
    > I've got a fairly simple forms authentication project (a login page and a
    > single secure page), but a number of users (~25%) can't seem to get past[/color]
    the[color=blue]
    > login.aspx step. I theorized that this might have to do with their
    > browser's cookie setting.
    >
    > I had been using cookies to store session state and logon parameters (user
    > option), but I completely eliminated them using the SQLServer session
    > management approach. But now, with my test browser set on "prompt" for
    > cookies, I still get a message that my login page is trying to set a[/color]
    cookie.[color=blue]
    >
    > I gather it's from this statement:
    >
    > FormsAuthentica tion.RedirectFr omLoginPage(Use rSerialNo.Text,
    > false);
    >
    > If I accept the cookie, I move on to the secure page. If I don't, I end[/color]
    up[color=blue]
    > staying on the login.aspx page. I think that's what might be happening[/color]
    with[color=blue]
    > some of the users who attempt to access this page (even though most say
    > their browsers accept cookies).
    >
    > Any thoughts here? Is there any way to have an authentication scheme
    > without cookies? Might something else be throwing my users?
    >
    > TIA
    >
    > Harry
    >
    >[/color]


    Comment

    • Steve C. Orr, MCSD

      #3
      Re: Forms Authentication without a Cookie?

      In your web.config file, in your sessionState tag, set the attribute
      cookieless="tru e"

      --
      I hope this helps,
      Steve C. Orr, MCSD

      --------------------------------
      Hire top notch developers to get your projects done right:

      --------------------------------



      "Harry Whitehouse" <harry@envmgr.c om> wrote in message
      news:%23tBWQieZ DHA.2592@TK2MSF TNGP09.phx.gbl. ..[color=blue]
      > I've got a fairly simple forms authentication project (a login page and a
      > single secure page), but a number of users (~25%) can't seem to get past[/color]
      the[color=blue]
      > login.aspx step. I theorized that this might have to do with their
      > browser's cookie setting.
      >
      > I had been using cookies to store session state and logon parameters (user
      > option), but I completely eliminated them using the SQLServer session
      > management approach. But now, with my test browser set on "prompt" for
      > cookies, I still get a message that my login page is trying to set a[/color]
      cookie.[color=blue]
      >
      > I gather it's from this statement:
      >
      > FormsAuthentica tion.RedirectFr omLoginPage(Use rSerialNo.Text,
      > false);
      >
      > If I accept the cookie, I move on to the secure page. If I don't, I end[/color]
      up[color=blue]
      > staying on the login.aspx page. I think that's what might be happening[/color]
      with[color=blue]
      > some of the users who attempt to access this page (even though most say
      > their browsers accept cookies).
      >
      > Any thoughts here? Is there any way to have an authentication scheme
      > without cookies? Might something else be throwing my users?
      >
      > TIA
      >
      > Harry
      >
      >[/color]


      Comment

      • Harry Whitehouse

        #4
        Re: Forms Authentication without a Cookie?

        Steve -- Thanks for replying!

        I had set that parameter, but had that one last cookie write attempt
        nonetheless!

        Harry

        "Steve C. Orr, MCSD" <Steve@Orr.ne t> wrote in message
        news:O9tZoyeZDH A.2236@TK2MSFTN GP10.phx.gbl...[color=blue]
        > In your web.config file, in your sessionState tag, set the attribute
        > cookieless="tru e"
        >
        > --
        > I hope this helps,
        > Steve C. Orr, MCSD
        > http://Steve.Orr.net
        > --------------------------------
        > Hire top notch developers to get your projects done right:
        > http://www.able-consulting.com
        > --------------------------------
        >
        >
        >
        > "Harry Whitehouse" <harry@envmgr.c om> wrote in message
        > news:%23tBWQieZ DHA.2592@TK2MSF TNGP09.phx.gbl. ..[color=green]
        > > I've got a fairly simple forms authentication project (a login page and[/color][/color]
        a[color=blue][color=green]
        > > single secure page), but a number of users (~25%) can't seem to get past[/color]
        > the[color=green]
        > > login.aspx step. I theorized that this might have to do with their
        > > browser's cookie setting.
        > >
        > > I had been using cookies to store session state and logon parameters[/color][/color]
        (user[color=blue][color=green]
        > > option), but I completely eliminated them using the SQLServer session
        > > management approach. But now, with my test browser set on "prompt" for
        > > cookies, I still get a message that my login page is trying to set a[/color]
        > cookie.[color=green]
        > >
        > > I gather it's from this statement:
        > >
        > > FormsAuthentica tion.RedirectFr omLoginPage(Use rSerialNo.Text,
        > > false);
        > >
        > > If I accept the cookie, I move on to the secure page. If I don't, I end[/color]
        > up[color=green]
        > > staying on the login.aspx page. I think that's what might be happening[/color]
        > with[color=green]
        > > some of the users who attempt to access this page (even though most say
        > > their browsers accept cookies).
        > >
        > > Any thoughts here? Is there any way to have an authentication scheme
        > > without cookies? Might something else be throwing my users?
        > >
        > > TIA
        > >
        > > Harry
        > >
        > >[/color]
        >
        >[/color]


        Comment

        • Harry Whitehouse

          #5
          Re: Forms Authentication without a Cookie?

          Ken -- Thanks for this. I had not seen this article!

          Harry

          "Ken Cox [Microsoft MVP]" <BANSPAMken_cox @sympatico.ca> wrote in message
          news:eVoKMreZDH A.4028@tk2msftn gp13.phx.gbl...[color=blue]
          > Hi Harry,
          >
          > You may have seen it, but there's an article here on cookieless forms
          > authentication. Can't tell from here if it works....
          >
          > http://www.codeproject.com/aspnet/cookieless.asp
          >
          > --[/color]


          Comment

          • Harry Whitehouse

            #6
            Re: Forms Authentication without a Cookie?

            John -- Good suggestion! I'll give that a try!

            Harry[color=blue]
            > Harry,
            >
            > I'd have one of your users turn on the prompt setting and let you know if
            > they get prompted.
            >
            > If that's the problem, you should try to find out why they won't accept
            > session cookies.
            > --
            > John Saunders
            > Internet Engineer
            > john.saunders@s urfcontrol.com
            >
            >
            >[/color]


            Comment

            • Steve C. Orr, MCSD

              #7
              Re: Forms Authentication without a Cookie?

              Yes, it will still try to use cookies even if you have this setting.
              But the cookie is not required for the authentication to work. So if the
              cookie is not successfully written then it should still work.

              --
              I hope this helps,
              Steve C. Orr, MCSD

              --------------------------------
              Hire top notch developers to get your projects done right:

              --------------------------------


              "Harry Whitehouse" <harry@envmgr.c om> wrote in message
              news:O75D1$nZDH A.2352@TK2MSFTN GP12.phx.gbl...[color=blue]
              > Steve -- Thanks for replying!
              >
              > I had set that parameter, but had that one last cookie write attempt
              > nonetheless!
              >
              > Harry
              >
              > "Steve C. Orr, MCSD" <Steve@Orr.ne t> wrote in message
              > news:O9tZoyeZDH A.2236@TK2MSFTN GP10.phx.gbl...[color=green]
              > > In your web.config file, in your sessionState tag, set the attribute
              > > cookieless="tru e"
              > >
              > > --
              > > I hope this helps,
              > > Steve C. Orr, MCSD
              > > http://Steve.Orr.net
              > > --------------------------------
              > > Hire top notch developers to get your projects done right:
              > > http://www.able-consulting.com
              > > --------------------------------
              > >
              > >
              > >
              > > "Harry Whitehouse" <harry@envmgr.c om> wrote in message
              > > news:%23tBWQieZ DHA.2592@TK2MSF TNGP09.phx.gbl. ..[color=darkred]
              > > > I've got a fairly simple forms authentication project (a login page[/color][/color][/color]
              and[color=blue]
              > a[color=green][color=darkred]
              > > > single secure page), but a number of users (~25%) can't seem to get[/color][/color][/color]
              past[color=blue][color=green]
              > > the[color=darkred]
              > > > login.aspx step. I theorized that this might have to do with their
              > > > browser's cookie setting.
              > > >
              > > > I had been using cookies to store session state and logon parameters[/color][/color]
              > (user[color=green][color=darkred]
              > > > option), but I completely eliminated them using the SQLServer session
              > > > management approach. But now, with my test browser set on "prompt"[/color][/color][/color]
              for[color=blue][color=green][color=darkred]
              > > > cookies, I still get a message that my login page is trying to set a[/color]
              > > cookie.[color=darkred]
              > > >
              > > > I gather it's from this statement:
              > > >
              > > >[/color][/color][/color]
              FormsAuthentica tion.RedirectFr omLoginPage(Use rSerialNo.Text,[color=blue][color=green][color=darkred]
              > > > false);
              > > >
              > > > If I accept the cookie, I move on to the secure page. If I don't, I[/color][/color][/color]
              end[color=blue][color=green]
              > > up[color=darkred]
              > > > staying on the login.aspx page. I think that's what might be[/color][/color][/color]
              happening[color=blue][color=green]
              > > with[color=darkred]
              > > > some of the users who attempt to access this page (even though most[/color][/color][/color]
              say[color=blue][color=green][color=darkred]
              > > > their browsers accept cookies).
              > > >
              > > > Any thoughts here? Is there any way to have an authentication scheme
              > > > without cookies? Might something else be throwing my users?
              > > >
              > > > TIA
              > > >
              > > > Harry
              > > >
              > > >[/color]
              > >
              > >[/color]
              >
              >[/color]


              Comment

              Working...