RoleManagerSection.CookiePath Properti
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
Mendapatkan atau mengatur jalur virtual cookie yang digunakan untuk menyimpan nama peran.
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
Nilai Properti
Jalur cookie yang digunakan untuk menyimpan nama peran. Defaultnya adalah "/".
- Atribut
Contoh
Contoh kode berikut menunjukkan cara menggunakan CookiePath properti . Contoh kode ini adalah bagian dari contoh yang lebih besar yang disediakan untuk RoleManagerSection kelas .
// Display CookiePath property.
Console.WriteLine("CookiePath: {0}", configSection.CookiePath);
' Display CookiePath property.
Console.WriteLine("CookiePath: {0}", configSection.CookiePath)
Keterangan
Anda dapat menentukan jalur cookie tempat nama peran di-cache untuk aplikasi Anda dengan mengatur cookiePath atribut dalam file Web.config untuk aplikasi ASP.NET Anda. Properti CookiePath mengembalikan nilai cookiePath atribut dari file Web.config. Jalur peka huruf besar/kecil.