FormsAuthenticationConfiguration.Path 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 cookie.
public:
property System::String ^ Path { System::String ^ get(); void set(System::String ^ value); };
[System.Configuration.ConfigurationProperty("path", DefaultValue="/")]
[System.Configuration.StringValidator(MinLength=1)]
public string Path { get; set; }
[<System.Configuration.ConfigurationProperty("path", DefaultValue="/")>]
[<System.Configuration.StringValidator(MinLength=1)>]
member this.Path : string with get, set
Public Property Path As String
Nilai Properti
Jalur cookie HTTP yang digunakan untuk autentikasi. Nilai default adalah garis miring (/), yang mewakili akar aplikasi Web.
- Atribut
Contoh
Contoh kode berikut menunjukkan cara mengakses Path properti. Lihat contoh kode dalam FormsAuthenticationConfiguration topik kelas untuk mempelajari cara mendapatkan bagian .
// Get the current Path.
string currentPath = formsAuthentication.Path;
// Set the Path property.
formsAuthentication.Path = "newPath";
' Get the current Path.
Dim currentPath As String = formsAuthentication.Path
' Set the Path property.
formsAuthentication.Path = "newPath"
Keterangan
Properti Path menunjukkan tempat cookie autentikasi berada dan ditransmisikan bersama dengan cookie autentikasi itu sendiri.