IdentitySection.Impersonate 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
會取得或設定一個值,指示每個請求是否使用用戶端模擬。
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
屬性值
true若使用客戶模擬;否則,。 false 預設值為 false。
- 屬性
範例
以下程式碼範例說明如何存取該 Impersonate 物業。 參考課程 IdentitySection 範例,了解如何存取該區段。
// 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
備註
若屬性 Impersonate 設為 true,則每個請求由冒充其用戶端的網頁應用程式執行。 也就是說,要麼是目前登入的使用者,要麼是由 UserName and Password 屬性指定的使用者。 當屬性 Impersonate 設定為 false時,應用程式不會冒充任何用戶端使用者。