FormsAuthenticationUser.Password Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the user's password.
public:
property System::String ^ Password { System::String ^ get(); void set(System::String ^ value); };
[System.Configuration.ConfigurationProperty("password", DefaultValue="", IsRequired=true)]
[System.Configuration.StringValidator]
public string Password { get; set; }
[<System.Configuration.ConfigurationProperty("password", DefaultValue="", IsRequired=true)>]
[<System.Configuration.StringValidator>]
member this.Password : string with get, set
Public Property Password As String
Property Value
The user's password required by the application.
- Attributes
Examples
The following code example shows how to use the Password property. Refer to the code example in the FormsAuthenticationUser class topic to learn how to get the section.
// Using the Password property.
// Get current password.
string currentPassword =
formsAuthenticationUsers[0].Password;
// Set a SHA1 encrypted password.
// This example uses the SHA1 algorithm.
// Due to collision problems with SHA1, Microsoft recommends SHA256 or better.
formsAuthenticationUsers[0].Password =
"5BAA61E4C9B93F3F0682250B6CF8331B7EE68FD8";
' Using the Password property.
' Get current password.
Dim currentPassword As String = _
formsAuthenticationUsers(0).Password
' Set a SHA1 encrypted password.
' This example uses the SHA1 algorithm.
' Due to collision problems with SHA1, Microsoft recommends SHA256 or better.
formsAuthenticationUsers(0).Password = _
"5BAA61E4C9B93F3F0682250B6CF8331B7EE68FD8"
Applies to
Spolupracujte s námi na GitHubu
Zdroj tohoto obsahu najdete na GitHubu, kde můžete také vytvářet a kontrolovat problémy a žádosti o přijetí změn. Další informace najdete v našem průvodci pro přispěvatele.
Váš názor
https://aka.ms/ContentUserFeedback.
Připravujeme: V průběhu roku 2024 budeme postupně vyřazovat problémy z GitHub coby mechanismus zpětné vazby pro obsah a nahrazovat ho novým systémem zpětné vazby. Další informace naleznete v tématu:Odeslat a zobrazit názory pro