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

  1. #1

    Default FormsAuthentication

    Hi, i am using forms authentication in an ASP.NET project

    I am setting the Forms authentication cookie by using:
    FormsAuthentication.RedirectFromLoginPage(UserName .Text, false);

    Now when i review my trace on my page, there are two cookies created that
    look identical.
    When i FormsAuthentication.SignOut() they both dissappear.

    Any ideas as to why two cookies are created?

    TIA

    P.S. Sorry for the double post, i thought this was more relevant in the
    ..security newsgroup


    Grant Merwitz Guest

  2. Similar Questions and Discussions

    1. FormsAuthentication with non-IE browser
      Hi, I have implemented a SSO solution using FormsAuthentication. FormsAuthentication.GetRedirecturl method does redirect to the requested...
    2. BUG With FormsAuthentication
      The authentication cookie with custom user is not available or the user data is gone after a redirect. In other words all the examples on the net on...
    3. FormsAuthentication with Machine Name
      I had licked this problem once and it resurfaced and won't go away. When I browse to a site with my machine name FormsAuthetication appears to...
    4. FormsAuthentication using xml file
      Hi Andrea, Thanx for the link to the article ...It was really useful...but again i have a question which remains unanswered...Please can u help...
    5. WindowsApplication and FormsAuthentication?
      I have a WebService that is using FormsAuthentication (setup in the web.config file) as follows: <authentication mode="Forms"> <forms...
  3. #2

    Default Re: FormsAuthentication


    "Grant Merwitz" <grant@workshare.com> wrote in message
    news:uS%23smByHFHA.1528@TK2MSFTNGP09.phx.gbl...
    > Hi, i am using forms authentication in an ASP.NET project
    >
    > I am setting the Forms authentication cookie by using:
    > FormsAuthentication.RedirectFromLoginPage(UserName .Text, false);
    >
    > Now when i review my trace on my page, there are two cookies created that
    > look identical.
    > When i FormsAuthentication.SignOut() they both dissappear.
    >
    > Any ideas as to why two cookies are created?
    >
    > TIA
    >
    > P.S. Sorry for the double post, i thought this was more relevant in the
    > .security newsgroup
    >
    >
    I am not sure why they do this. It might be for tighter security and to
    help stop cookie poisoning or some other form of attach on the cookies.


    jjardine Guest

  4. #3

    Default Re: FormsAuthentication

    It should be only one cookie (non persistent) per Forms session.
    Check out if you perhaps did some testing with persist=true parameter of
    RedirectFromLoginPage function and the you might have an old persistent
    cookie from that testing session.

    --
    Hernan de Lahitte
    [url]http://weblogs.asp.net/hernandl[/url]
    [url]http://www.lagash.com/english/index.html[/url]


    "Grant Merwitz" <grant@workshare.com> wrote in message
    news:uS%23smByHFHA.1528@TK2MSFTNGP09.phx.gbl...
    > Hi, i am using forms authentication in an ASP.NET project
    >
    > I am setting the Forms authentication cookie by using:
    > FormsAuthentication.RedirectFromLoginPage(UserName .Text, false);
    >
    > Now when i review my trace on my page, there are two cookies created that
    > look identical.
    > When i FormsAuthentication.SignOut() they both dissappear.
    >
    > Any ideas as to why two cookies are created?
    >
    > TIA
    >
    > P.S. Sorry for the double post, i thought this was more relevant in the
    > .security newsgroup
    >
    >

    Hernan de Lahitte Guest

  5. #4

    Default Re: FormsAuthentication

    can't be.

    When i log out, using FormsAuthentication.SignOut();

    both cookies disappear from the cookies collection.
    Then when i sign in again, both reappear.

    This application is set up as a virtual directory. Could that have something
    to do with it?

    "Hernan de Lahitte" <hernan@lagash.com> wrote in message
    news:eBeoCp$HFHA.2936@TK2MSFTNGP15.phx.gbl...
    > It should be only one cookie (non persistent) per Forms session.
    > Check out if you perhaps did some testing with persist=true parameter of
    > RedirectFromLoginPage function and the you might have an old persistent
    > cookie from that testing session.
    >
    > --
    > Hernan de Lahitte
    > [url]http://weblogs.asp.net/hernandl[/url]
    > [url]http://www.lagash.com/english/index.html[/url]
    >
    >
    > "Grant Merwitz" <grant@workshare.com> wrote in message
    > news:uS%23smByHFHA.1528@TK2MSFTNGP09.phx.gbl...
    >> Hi, i am using forms authentication in an ASP.NET project
    >>
    >> I am setting the Forms authentication cookie by using:
    >> FormsAuthentication.RedirectFromLoginPage(UserName .Text, false);
    >>
    >> Now when i review my trace on my page, there are two cookies created that
    >> look identical.
    >> When i FormsAuthentication.SignOut() they both dissappear.
    >>
    >> Any ideas as to why two cookies are created?
    >>
    >> TIA
    >>
    >> P.S. Sorry for the double post, i thought this was more relevant in the
    >> .security newsgroup
    >>
    >>
    >
    >

    Grant Merwitz Guest

  6. #5

    Default Re: FormsAuthentication

    Do you have any code sample of your login page and any other section that
    you may dealing with Forms Authentication or your Principal object ? (cookie
    handling as well )

    --
    Hernan de Lahitte
    [url]http://weblogs.asp.net/hernandl[/url]
    [url]http://www.lagash.com/english/index.html[/url]


    "Grant Merwitz" <grant@workshare.com> wrote in message
    news:uDa4S9$HFHA.2784@TK2MSFTNGP09.phx.gbl...
    > can't be.
    >
    > When i log out, using FormsAuthentication.SignOut();
    >
    > both cookies disappear from the cookies collection.
    > Then when i sign in again, both reappear.
    >
    > This application is set up as a virtual directory. Could that have
    > something to do with it?
    >
    > "Hernan de Lahitte" <hernan@lagash.com> wrote in message
    > news:eBeoCp$HFHA.2936@TK2MSFTNGP15.phx.gbl...
    >> It should be only one cookie (non persistent) per Forms session.
    >> Check out if you perhaps did some testing with persist=true parameter of
    >> RedirectFromLoginPage function and the you might have an old persistent
    >> cookie from that testing session.
    >>
    >> --
    >> Hernan de Lahitte
    >> [url]http://weblogs.asp.net/hernandl[/url]
    >> [url]http://www.lagash.com/english/index.html[/url]
    >>
    >>
    >> "Grant Merwitz" <grant@workshare.com> wrote in message
    >> news:uS%23smByHFHA.1528@TK2MSFTNGP09.phx.gbl...
    >>> Hi, i am using forms authentication in an ASP.NET project
    >>>
    >>> I am setting the Forms authentication cookie by using:
    >>> FormsAuthentication.RedirectFromLoginPage(UserName .Text, false);
    >>>
    >>> Now when i review my trace on my page, there are two cookies created
    >>> that
    >>> look identical.
    >>> When i FormsAuthentication.SignOut() they both dissappear.
    >>>
    >>> Any ideas as to why two cookies are created?
    >>>
    >>> TIA
    >>>
    >>> P.S. Sorry for the double post, i thought this was more relevant in the
    >>> .security newsgroup
    >>>
    >>>
    >>
    >>
    >
    >

    Hernan de Lahitte Guest

  7. #6

    Default Re: FormsAuthentication

    excuse the late response

    i actually realised it was only when my application was running as a virtual
    directory.
    When i changed it to be the root directory, the second cookie suddenly
    disappeared.

    strange

    "Hernan de Lahitte" <hernan@lagash.com> wrote in message
    news:OchEmPLIFHA.3376@TK2MSFTNGP14.phx.gbl...
    > Do you have any code sample of your login page and any other section that
    > you may dealing with Forms Authentication or your Principal object ?
    > (cookie handling as well )
    >
    > --
    > Hernan de Lahitte
    > [url]http://weblogs.asp.net/hernandl[/url]
    > [url]http://www.lagash.com/english/index.html[/url]
    >
    >
    > "Grant Merwitz" <grant@workshare.com> wrote in message
    > news:uDa4S9$HFHA.2784@TK2MSFTNGP09.phx.gbl...
    >> can't be.
    >>
    >> When i log out, using FormsAuthentication.SignOut();
    >>
    >> both cookies disappear from the cookies collection.
    >> Then when i sign in again, both reappear.
    >>
    >> This application is set up as a virtual directory. Could that have
    >> something to do with it?
    >>
    >> "Hernan de Lahitte" <hernan@lagash.com> wrote in message
    >> news:eBeoCp$HFHA.2936@TK2MSFTNGP15.phx.gbl...
    >>> It should be only one cookie (non persistent) per Forms session.
    >>> Check out if you perhaps did some testing with persist=true parameter of
    >>> RedirectFromLoginPage function and the you might have an old persistent
    >>> cookie from that testing session.
    >>>
    >>> --
    >>> Hernan de Lahitte
    >>> [url]http://weblogs.asp.net/hernandl[/url]
    >>> [url]http://www.lagash.com/english/index.html[/url]
    >>>
    >>>
    >>> "Grant Merwitz" <grant@workshare.com> wrote in message
    >>> news:uS%23smByHFHA.1528@TK2MSFTNGP09.phx.gbl...
    >>>> Hi, i am using forms authentication in an ASP.NET project
    >>>>
    >>>> I am setting the Forms authentication cookie by using:
    >>>> FormsAuthentication.RedirectFromLoginPage(UserName .Text, false);
    >>>>
    >>>> Now when i review my trace on my page, there are two cookies created
    >>>> that
    >>>> look identical.
    >>>> When i FormsAuthentication.SignOut() they both dissappear.
    >>>>
    >>>> Any ideas as to why two cookies are created?
    >>>>
    >>>> TIA
    >>>>
    >>>> P.S. Sorry for the double post, i thought this was more relevant in the
    >>>> .security newsgroup
    >>>>
    >>>>
    >>>
    >>>
    >>
    >>
    >
    >

    Grant Merwitz 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