This documentation is archived and is not being maintained.

FormsAuthenticationTicket Constructor (Int32, String, DateTime, DateTime, Boolean, String)

.NET Framework 1.1

Initializes a new instance of the FormsAuthenticationTicket class with cookie name, version, expiration date, issue date, persistence, and user-defined data.

[Visual Basic]
Public Sub New( _
   ByVal version As Integer, _
   ByVal name As String, _
   ByVal issueDate As DateTime, _
   ByVal expiration As DateTime, _
   ByVal isPersistent As Boolean, _
   ByVal userData As String _
)
[C#]
public FormsAuthenticationTicket(
   int version,
 string name,
 DateTime issueDate,
 DateTime expiration,
 bool isPersistent,
 string userData
);
[C++]
public: FormsAuthenticationTicket(
   int version,
 String* name,
 DateTime issueDate,
 DateTime expiration,
 bool isPersistent,
 String* userData
);
[JScript]
public function FormsAuthenticationTicket(
   version : int,
 name : String,
 issueDate : DateTime,
 expiration : DateTime,
 isPersistent : Boolean,
 userData : String
);

Parameters

version
The version number.
name
The user name associated with the ticket.
issueDate
The time at which the cookie was issued.
expiration
The expiration date for the cookie.
isPersistent
true if the cookie is persistent; otherwise, false.
userData
User-defined data to be stored in the cookie.

Requirements

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

See Also

FormsAuthenticationTicket Class | FormsAuthenticationTicket Members | System.Web.Security Namespace | FormsAuthenticationTicket Constructor Overload List

Show: