FormsAuthenticationTicket.Version Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets the version number of the ticket.

Namespace:   System.Web.Security
Assembly:  System.Web (in System.Web.dll)

member Version : int with get

Property Value

Type: System.Int32

The version number of the ticket. The default is 2.

If the FormsAuthenticationTicket is created using a constructor that does not supply a version parameter, the Version property returns 2; otherwise, the version property returns the value supplied to the FormsAuthenticationTicket constructor.

The following code example displays the property values of the FormsAuthenticationTicket for the current logged-on user.

System_CAPS_noteNote

If there is no logged-on user, the Identity property will be null and you will receive a compiler exception when attempting to cast the Identity property as a FormsIdentity object.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show: