Problem with Forms Authentication cookies

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

  1. #1

    Default Problem with Forms Authentication cookies

    Hi,

    We're having an issue with Forms Authentication cookies being treated as
    expired / invalid, and being deleted. This is causing our intranet users a
    great deal of pain

    - Running IIS 5.0 on Win2k Server
    - Forms Authentication is setup with a timeout value of 45 minutes in
    web.config
    - Session timeout is set to 45 minutes in web.config

    In viewing the IIS logs, we an see a request for an aspx page (a POST) with
    a response of 302. The log shows the cookies sent in with the request -
    only 2, the ASP.NET_SessionID cookie and the Forms Authentication cookie,
    which we named CSSAuth.

    The next request coming is is a GET request for the Forms Authentication
    login aspx page. The query string contains the url of the originally
    requested page. In this request there is only one cookie - the
    ASP.NET_SessionID cookie. The CSSAuth cooke is NOT THERE in this request.

    In looking at the logs for NORMAL expired authentication redirects these
    requests always contain the CSSAuth cookie, even though it is ezpired. In
    the cases where users get redirected to login prior to authentication
    timeout, the cookie is missing from the GET request issued in response to
    the redirect.

    Why is this authentication ticket cookie seen as invalid prior to timeout?
    Why is this cookie being removed? What piece of code is responsible for
    doing all this?

    Scott L.


    Scott Guest

  2. Similar Questions and Discussions

    1. Forms authentication / cookies
      Hi! I'm just curious about the use of cookies in forms authentication. The username and roles are stored in the encrypted cookie, but if a user...
    2. Problem in forms authentication
      Hi friends, We have an web application which contains several folders & we are trying to implement forms authentication. Login page for the...
    3. forms authentication problem
      I tried on the Security newgroup, as well as other places, and haven't gotten an answer yet - - I'm pulling my hair out over this one. I'm trying...
    4. Forms Authentication Problem with WebRequest (Tried Everything)
      Hello, all, I have done my homework, but I can not get my webrequest to access a page which is protected by forms authentication. As other...
    5. Problem with Forms Authentication
      I have an application using FormsAuthentication that does not persist the authentication cookie beyond the session so each time a user starts a...
  3. #2

    Default Re: Problem with Forms Authentication cookies

    We had the same problem, after lot of hunting, we found, running Antivirus
    software causes the web.config, global.asax or the dll to be touched. The
    causes the workerprocess to recycle and u loose all session. And this
    happens randomly, and sessions dont last beyond 3 mins.

    The best solution is using out of process session management. That is in an
    sql server.

    "Scott" <ScottLorenz@UniversalComputerSys.Com> wrote in message
    news:OtxKLh1kDHA.2500@TK2MSFTNGP10.phx.gbl...
    > Hi,
    >
    > We're having an issue with Forms Authentication cookies being treated as
    > expired / invalid, and being deleted. This is causing our intranet users a
    > great deal of pain
    >
    > - Running IIS 5.0 on Win2k Server
    > - Forms Authentication is setup with a timeout value of 45 minutes in
    > web.config
    > - Session timeout is set to 45 minutes in web.config
    >
    > In viewing the IIS logs, we an see a request for an aspx page (a POST)
    with
    > a response of 302. The log shows the cookies sent in with the request -
    > only 2, the ASP.NET_SessionID cookie and the Forms Authentication cookie,
    > which we named CSSAuth.
    >
    > The next request coming is is a GET request for the Forms Authentication
    > login aspx page. The query string contains the url of the originally
    > requested page. In this request there is only one cookie - the
    > ASP.NET_SessionID cookie. The CSSAuth cooke is NOT THERE in this request.
    >
    > In looking at the logs for NORMAL expired authentication redirects these
    > requests always contain the CSSAuth cookie, even though it is ezpired.
    In
    > the cases where users get redirected to login prior to authentication
    > timeout, the cookie is missing from the GET request issued in response to
    > the redirect.
    >
    > Why is this authentication ticket cookie seen as invalid prior to timeout?
    > Why is this cookie being removed? What piece of code is responsible for
    > doing all this?
    >
    > Scott L.
    >
    >

    Rajesh.V 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