IdentitySection.UserName 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定一個值,指示用於冒充的使用者名稱。
public:
property System::String ^ UserName { System::String ^ get(); void set(System::String ^ value); };
[System.Configuration.ConfigurationProperty("userName", DefaultValue="")]
public string UserName { get; set; }
[<System.Configuration.ConfigurationProperty("userName", DefaultValue="")>]
member this.UserName : string with get, set
Public Property UserName As String
屬性值
用來冒充的使用者名稱。
- 屬性
範例
以下程式碼範例說明如何存取該 UserName 物業。 參考課程 IdentitySection 範例,了解如何存取該區段。
// Get the UserName property value.
string currentUserName = identitySection.UserName;
// Set the UserName property value.
identitySection.UserName = "userName";
' Get the UserName property value.
Dim currentUserName As String = identitySection.UserName
' Set the UserName property value.
identitySection.UserName = "userName"
備註
由於使用者名稱是以明文儲存,擁有正確憑證的認證使用者可以在伺服器所在的網域中讀取該名稱。