System.Web.Security.FormsAuthentication.RenewTicketIfOld Method

Conditionally updates the issue date and time and expiration date and time for a System.Web.Security.FormsAuthenticationTicket.

Syntax

public static FormsAuthenticationTicket RenewTicketIfOld (FormsAuthenticationTicket tOld)

Parameters

tOld
The forms-authentication ticket to update.

Returns

The updated System.Web.Security.FormsAuthenticationTicket.

Remarks

The FormsAuthentication.RenewTicketIfOld(FormsAuthenticationTicket) method updates the expiration date and time of the supplied System.Web.Security.FormsAuthenticationTicket if the current date and time minus the FormsAuthenticationTicket.IssueDate value is greater than the FormsAuthenticationTicket.Expiration value minus the current date and time.

The ticket is updated with the FormsAuthenticationTicket.IssueDate property set to the current date and time and the FormsAuthenticationTicket.Expiration property set to the current date and time plus the original FormsAuthenticationTicket.Expiration value minus the original FormsAuthenticationTicket.IssueDate value.

Requirements

Namespace: System.Web.Security
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0