FormsAuthenticationCredentials.PasswordFormat 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 password format.
public:
property System::Web::Configuration::FormsAuthPasswordFormat PasswordFormat { System::Web::Configuration::FormsAuthPasswordFormat get(); void set(System::Web::Configuration::FormsAuthPasswordFormat value); };
[System.Configuration.ConfigurationProperty("passwordFormat", DefaultValue=System.Web.Configuration.FormsAuthPasswordFormat.SHA1)]
public System.Web.Configuration.FormsAuthPasswordFormat PasswordFormat { get; set; }
[<System.Configuration.ConfigurationProperty("passwordFormat", DefaultValue=System.Web.Configuration.FormsAuthPasswordFormat.SHA1)>]
member this.PasswordFormat : System.Web.Configuration.FormsAuthPasswordFormat with get, set
Public Property PasswordFormat As FormsAuthPasswordFormat
Property Value
One of the FormsAuthPasswordFormat values.
- Attributes
Examples
The following code example shows how to access the PasswordFormat property. Refer to the code example in the FormsAuthenticationCredentials class topic to learn how to get the section.
// Get the current PasswordFormat property value.
FormsAuthPasswordFormat currentPasswordFormat =
formsAuthenticationCredentials.PasswordFormat;
// Set the PasswordFormat property value.
// This example uses the SHA1 algorithm.
// Due to collision problems with SHA1, Microsoft recommends SHA256 or better.
formsAuthenticationCredentials.PasswordFormat =
FormsAuthPasswordFormat.SHA1;
' Get the current PasswordFormat property value.
Dim currentPasswordFormat _
As FormsAuthPasswordFormat = _
formsAuthenticationCredentials.PasswordFormat
' Set the PasswordFormat property value.
' This example uses the SHA1 algorithm.
' Due to collision problems with SHA1, Microsoft recommends SHA256 or better.
formsAuthenticationCredentials.PasswordFormat = _
FormsAuthPasswordFormat.SHA1
Applies to
See also
Співпраця з нами на GitHub
Джерело цього вмісту можна знайти на GitHub, де також можна створювати й переглядати запитання та запити на внесення змін. Докладні відомості наведено в нашому посібнику для співавторів.
Зворотний зв’язок
https://aka.ms/ContentUserFeedback.
Очікується незабаром: протягом 2024 року ми будемо припиняти використання механізму реєстрації проблем у GitHub для зворотного зв’язку щодо вмісту й замінювати його новою системою зворотного зв’язку. Докладніше:Надіслати й переглянути відгук про