FormsAuthentication.FormsCookiePath Egenskap

Definition

Hämtar sökvägen för cookien för formulärautentisering.

public:
 static property System::String ^ FormsCookiePath { System::String ^ get(); };
public static string FormsCookiePath { get; }
static member FormsCookiePath : string
Public Shared ReadOnly Property FormsCookiePath As String

Egenskapsvärde

Sökvägen till cookien där information om formulärautentiseringsbegäran lagras. Standardvärdet är "/".

Exempel

I följande kodexempel anges FormsCookiePath egenskapsvärdet med hjälp path av attributet i filen Web.config.

<authentication mode="Forms">
  <forms loginUrl="member_login.aspx"
    cookieless="UseCookies"
    path="/MyApplication" />
</authentication>

Kommentarer

Egenskapsvärdet FormsCookiePath anges i konfigurationsfilen för ett ASP.NET-program med hjälp av attributet path för forms konfigurationselementet. FormsCookiePath Anger Path för cookien som lagrar FormsAuthenticationTicket informationen.

Gäller för

Se även