This documentation is archived and is not being maintained.

FormsAuthentication.Decrypt Method

Returns an instance of a FormsAuthenticationTicket class, given a valid encrypted authentication ticket obtained from an HTTP cookie.

[Visual Basic]
Public Shared Function Decrypt( _
   ByVal encryptedTicket As String _
) As FormsAuthenticationTicket
public static FormsAuthenticationTicket Decrypt(
 string encryptedTicket
public: static FormsAuthenticationTicket* Decrypt(
 String* encryptedTicket
public static function Decrypt(
   encryptedTicket : String
) : FormsAuthenticationTicket;


The encrypted authentication ticket.

Return Value

Returns a FormsAuthenticationTicket object. If encryptedTicket is not a valid ticket, Decrypt returns a null reference (Nothing in Visual Basic).


Exception Type Condition
ArgumentException encryptedTicket is not in a invalid format.


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

See Also

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