FormsAuthentication.GetAuthCookie Method (String, Boolean, String)
.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.
Namespace: System.Web.Security
Assembly: System.Web (in system.web.dll)
Assembly: System.Web (in system.web.dll)
public: static HttpCookie^ GetAuthCookie ( String^ userName, bool createPersistentCookie, String^ strCookiePath )
public static HttpCookie GetAuthCookie ( String userName, boolean createPersistentCookie, String strCookiePath )
public static function GetAuthCookie ( userName : String, createPersistentCookie : boolean, strCookiePath : String ) : 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.
- strCookiePath
The Path of the authentication cookie.
Return Value
An HttpCookie that contains encrypted forms-authentication ticket information.Community Additions
ADD
Show: