Export (0) Print
Expand All

FormsAuthentication.RenewTicketIfOld Method

Conditionally updates the sliding expiration on a FormsAuthenticationTicket.

[Visual Basic]
Public Shared Function RenewTicketIfOld( _
   ByVal tOld As FormsAuthenticationTicket _
) As FormsAuthenticationTicket
[C#]
public static FormsAuthenticationTicket RenewTicketIfOld(
 FormsAuthenticationTicket tOld
);
[C++]
public: static FormsAuthenticationTicket* RenewTicketIfOld(
 FormsAuthenticationTicket* tOld
);
[JScript]
public static function RenewTicketIfOld(
   tOld : FormsAuthenticationTicket
) : FormsAuthenticationTicket;

Parameters

tOld
The authentication ticket to update.

Return Value

The updated FormsAuthenticationTicket.

Remarks

The ticket is updated with the IssueDate property set to the current time and the Expiration property based on the difference between the previous expiration time and the previous issue time. The ticket will be updated if the current date and time minus IssueDate is greater than the expiration date minus the current date and time [(DateTime.Now - IssueDate) > (Expiration - DateTime.Now)].

Requirements

Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family

See Also

FormsAuthentication Class | FormsAuthentication Members | System.Web.Security Namespace

Show:
© 2014 Microsoft