Share via


IdentitySection.Password 属性

定义

获取或设置一个值,该值指示用于模拟的密码。

public:
 property System::String ^ Password { System::String ^ get(); void set(System::String ^ value); };
[System.Configuration.ConfigurationProperty("password", DefaultValue="")]
public string Password { get; set; }
[<System.Configuration.ConfigurationProperty("password", DefaultValue="")>]
member this.Password : string with get, set
Public Property Password As String

属性值

要用于模拟的密码。

属性

示例

下面的代码示例演示如何访问 Password 属性。 请参阅 类的 IdentitySection 代码示例,了解如何访问 节。

// Get the Password property value.
string currentPassword = identitySection.Password;

// Set the Password property value.
identitySection.Password = "userPassword";
' Get the Password property value.
Dim currentPassword As String = identitySection.Password

' Set the Password property value.
identitySection.Password = "userPassword"

注解

由于密码以明文形式存储,因此在服务器所在的域中具有适当凭据的经过身份验证的用户可以读取密码。

注意

出于安全原因,标识部分支持存储加密 UserName 的 和 Password

适用于