Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

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
[C#]
public static FormsAuthenticationTicket Decrypt(
 string encryptedTicket
);
[C++]
public: static FormsAuthenticationTicket* Decrypt(
 String* encryptedTicket
);
[JScript]
public static function Decrypt(
   encryptedTicket : String
) : FormsAuthenticationTicket;

Parameters

encryptedTicket
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).

Exceptions

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

Requirements

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

See Also

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

Show:
© 2015 Microsoft