Bagikan melalui


IdentitySection.Impersonate Properti

Definisi

Mendapatkan atau menetapkan nilai yang menunjukkan apakah peniruan klien digunakan pada setiap permintaan.

public:
 property bool Impersonate { bool get(); void set(bool value); };
[System.Configuration.ConfigurationProperty("impersonate", DefaultValue=false)]
public bool Impersonate { get; set; }
[<System.Configuration.ConfigurationProperty("impersonate", DefaultValue=false)>]
member this.Impersonate : bool with get, set
Public Property Impersonate As Boolean

Nilai Properti

true jika peniruan klien digunakan; jika tidak, false. Nilai defaultnya adalah false.

Atribut

Contoh

Contoh kode berikut menunjukkan cara mengakses Impersonate properti . Lihat contoh IdentitySection kode kelas untuk mempelajari cara mengakses bagian.

// Get the Impersonate property value.
bool currentImpersonate = identitySection.Impersonate;

// Set the Impersonate property to true.
identitySection.Impersonate = true;
' Get the Impersonate property value.
Dim currentImpersonate As Boolean = identitySection.Impersonate

' Set the Impersonate property to true.
identitySection.Impersonate = True

Keterangan

Impersonate Jika properti diatur ke true, setiap permintaan dilayani oleh aplikasi Web yang meniru kliennya. Artinya, pengguna yang saat ini masuk atau pengguna yang ditentukan oleh UserName properti dan Password . Impersonate Ketika properti diatur ke false, aplikasi tidak meniru pengguna klien mana pun.

Catatan

Untuk alasan keamanan, bagian identitas mendukung penyimpanan terenkripsi UserName dan Password.

Berlaku untuk

Lihat juga