IdentitySection.Password 属性
定义
获取或设置一个值,该值指示用于模拟的密码。Gets or sets a value indicating the password to use for impersonation.
public:
property System::String ^ Password { System::String ^ get(); void set(System::String ^ value); };
[System.Configuration.ConfigurationProperty("password", DefaultValue=Mono.Cecil.CustomAttributeArgument)]
public string Password { get; set; }
[<System.Configuration.ConfigurationProperty("password", DefaultValue=Mono.Cecil.CustomAttributeArgument)>]
member this.Password : string with get, set
Public Property Password As String
属性值
要用于模拟的密码。The password to use for impersonation.
- 属性
示例
下面的代码示例演示如何访问 Password 属性。The following code example shows how to access the Password property. 请参阅类的代码示例 IdentitySection ,了解如何访问部分。Refer to the code example of the IdentitySection class to learn how to access the section.
// 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"
注解
由于密码是以明文形式存储的,因此在服务器所在的域上具有正确凭据的经过身份验证的用户可以读取它。Because the password is stored in clear text, an authenticated user with proper credentials on the domain where the server resides can read it.
备注
出于安全原因,标识部分支持加密和的存储 UserName Password 。For security reasons, the identity section supports storage of the encrypted UserName and Password.