RoleManagerSection.CookiePath Egenskap

Definition

Hämtar eller anger den virtuella sökvägen för den cookie som används för att cachelagrat rollnamn.

public:
 property System::String ^ CookiePath { System::String ^ get(); void set(System::String ^ value); };
[System.ComponentModel.TypeConverter(typeof(System.Configuration.WhiteSpaceTrimStringConverter))]
[System.Configuration.ConfigurationProperty("cookiePath", DefaultValue="/")]
[System.Configuration.StringValidator(MinLength=1)]
public string CookiePath { get; set; }
[<System.ComponentModel.TypeConverter(typeof(System.Configuration.WhiteSpaceTrimStringConverter))>]
[<System.Configuration.ConfigurationProperty("cookiePath", DefaultValue="/")>]
[<System.Configuration.StringValidator(MinLength=1)>]
member this.CookiePath : string with get, set
Public Property CookiePath As String

Egenskapsvärde

Sökvägen till den cookie som används för att lagra rollnamn. Standardvärdet är "/".

Attribut

Exempel

Följande kodexempel visar hur du använder egenskapen CookiePath . Det här kodexemplet är en del av ett större exempel för RoleManagerSection klassen.

// Display CookiePath property.
Console.WriteLine("CookiePath: {0}", configSection.CookiePath);
' Display CookiePath property.
Console.WriteLine("CookiePath: {0}", configSection.CookiePath)

Kommentarer

Du kan ange sökvägen till cookien där rollnamn cachelagras för ditt program genom att ange attributet cookiePath i Web.config-filen för ditt ASP.NET-program. Egenskapen CookiePath returnerar värdet för cookiePath attributet från filen Web.config. Sökvägen är skiftlägeskänslig.

Gäller för