FormsAuthentication.Decrypt Method

Creates a FormsAuthenticationTicket object based on the encrypted forms-authentication ticket passed to the method.

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

Public Shared Function Decrypt ( _
	encryptedTicket As String _
) As FormsAuthenticationTicket
Dim encryptedTicket As String
Dim returnValue As FormsAuthenticationTicket

returnValue = FormsAuthentication.Decrypt(encryptedTicket)
public static FormsAuthenticationTicket Decrypt (
	String encryptedTicket
public static function Decrypt (
	encryptedTicket : String
) : FormsAuthenticationTicket
Not applicable.



The encrypted authentication ticket.

Return Value

A FormsAuthenticationTicket object. If the encryptedTicket parameter is not a valid ticket, a null reference (Nothing in Visual Basic) is returned.

Exception typeCondition


encryptedTicket is a null reference (Nothing in Visual Basic).

- or -

encryptedTicket is an empty string ("").

- or -

encryptedTicket is of an invalid format.

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0