System.Web.Security.FormsAuthentication.GetAuthCookie Method

Creates an authentication cookie for a given user name. This does not set the cookie as part of the outgoing response.

Syntax

public static System.Web.HttpCookie GetAuthCookie (string userName, bool createPersistentCookie, string strCookiePath)

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 System.Web.HttpCookie.Path of the authentication cookie.

Returns

An System.Web.HttpCookie that contains encrypted forms-authentication ticket information.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: System.Web.Security
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0