FormsAuthentication.FormsCookieName Property

Definition

Gets the name of the cookie used to store the forms-authentication ticket.

C#
public static string FormsCookieName { get; }

Property Value

The name of the cookie used to store the forms-authentication ticket. The default is ".ASPXAUTH".

Examples

The following code example sets the FormsCookieName property value by using the name attribute in the Web.config file.

<authentication mode="Forms">
  <forms loginUrl="member_login.aspx"
    cookieless="UseCookies"
    name=".ASPXFORMSAUTH" />
</authentication>

Remarks

The FormsCookieName property value is set in the configuration file for an ASP.NET application by using the name attribute of the forms configuration element. The FormsCookieName is used to reference the cookie that stores the FormsAuthenticationTicket information.

Applies to

Product Versions
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

See also