RE: RedirectFromLoginPage persistent cookie expiration

From: jester (jester_at_discussions.microsoft.com)
Date: 11/30/04


Date: Mon, 29 Nov 2004 16:55:09 -0800


But what would be the default cookie expiration if I don't set it explicitly?

"John Paul. A" wrote:

> Hi jester,
> Please ignore my previous reply, becoz my reply to DPAPI has come here.
>
> Regarding the RedirectFromLoginPage - persistent cookie, you can control the
> expiration date, it is also a good practice too..
> Here how you can do?
>
> If persistentCookie And expirationDays > 0 Then
> ' Get a reference to the cookie just created.
> Dim cookie As HttpCookie = Response.Cookies _
> (FormsAuthentication.FormsCookieName)
> ' Set its expiration date.
> cookie.Expires = Now.AddDays(expirationDays)
> ' Ensure the cookie can travel only over https.
> 'cookie.Secure = True
> End If
>
> Rgds,
> John Paul. A
>
>
> "jester" wrote:
>
> >
> > Passing true for the second parameter of RedirectFromLoginPage creates a
> > persistent cookie. When does this cookie expire?
> >



Relevant Pages

  • Re: Cookies Expiring due to different time zones.
    ... post to your aspx login, sending the cookie's date in a hidden field ... set the aspx login cookie using the date/time in the hidden field ... This is the code I am using to create the ticket, ... Your problem is that you're using an extremely short time for the cookie expiration. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: cookie control in zonealarm doesnt work!
    ... browser has been shut....some sites wont work with just session cookies ... >> cookies and still check the expire date as after reciept the cookie is ... > whether or not the "persistent cookie" is still around, ...
    (comp.security.firewalls)
  • RE: browser session handling
    ... Persistent cookie ... These cookie will be persisted on the client user's hard disk and can be ... Only valid during the single browser instance's lifecycle. ... session are always of this kind and for IE, we can find that when we start ...
    (microsoft.public.dotnet.general)
  • Re: FormsAuthentication & createPersistentCookie
    ... ASP.NET will create a persistent cookie or session cookie for the ... authentication ticket is stored in client-side cookie by default. ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Forms Authentication Issue
    ... cookie so I am setting a 24 hr time for the persistent cookie which is ... So the problem is the login feature is working in most of the browsers ...
    (microsoft.public.dotnet.framework.aspnet)