FormsAuthentication.GetAuthCookie Method (String, Boolean)
.NET Framework 2.0
Creates an authentication cookie for a given user name. This does not set the cookie as part of the outgoing response, so that an application can have more control over how the cookie is issued.
Namespace: System.Web.Security
Assembly: System.Web (in system.web.dll)
Assembly: System.Web (in system.web.dll)
public static HttpCookie GetAuthCookie ( String userName, boolean createPersistentCookie )
public static function GetAuthCookie ( userName : String, createPersistentCookie : boolean ) : HttpCookie
Not applicable.
Parameters
- userName
The name of the authenticated user.
- createPersistentCookie
true to create a durable cookie (one that is saved across browser sessions); otherwise, false.
Return Value
An HttpCookie that contains encrypted forms-authentication ticket information. The default value for the FormsCookiePath property is used.Community Additions
ADD
Show: