Auf Englisch lesen Bearbeiten

Teilen über


AuthenticablePrincipal.ChangePassword(String, String) Method

Definition

Changes the account password from the old password to the new password. Do not use this with a ComputerPrincipal.

C#
public void ChangePassword (string oldPassword, string newPassword);

Parameters

oldPassword
String

The password that is changed.

newPassword
String

The new password.

Exceptions

The principal has not been persisted.

The new password does not meet the complexity requirements.

The principal is not a user.

Remarks

This method is not intended for computer principals. Calling this with a ComputerPrincipal will cause a NotSupportedException to be thrown.

Applies to

Produkt Versionen
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)