System.Web.Security.MembershipCreateStatus Enumeration

Describes the result of a Membership.CreateUser(string, string) operation.

Syntax

public enum MembershipCreateStatus

Remarks

The System.Web.Security.MembershipCreateStatus enumeration indicates the success or failure of an attempt to create a new user. If the Membership.CreateUser(string, string, string, string, string, bool, MembershipCreateStatus@) operation fails, the System.Web.Security.MembershipCreateStatus enumeration describes the cause of the failure.

Note:

If you are not familiar with the membership features of ASP.NET, see Introduction to Membership before continuing. For a list of other topics related to membership, see Managing Users By Using Membership.

If you use a erload:System.Web.Security.Membership.CreateUser method overload that does not specify an output parameter of type System.Web.Security.MembershipCreateStatus, an unsuccessful attempt to create a new user throws a System.Web.Security.MembershipCreateUserException with the MembershipCreateUserException.StatusCode property set to one of the System.Web.Security.MembershipCreateStatus enumeration values.

Members

Member NameDescription
DuplicateEmail

The e-mail address already exists in the database for the application.

DuplicateProviderUserKey

The provider user key already exists in the database for the application.

DuplicateUserName

The user name already exists in the database for the application.

InvalidAnswer

The password answer is not formatted correctly.

InvalidEmail

The e-mail address is not formatted correctly.

InvalidPassword

The password is not formatted correctly.

InvalidProviderUserKey

The provider user key is of an invalid type or format.

InvalidQuestion

The password question is not formatted correctly.

InvalidUserName

The user name was not found in the database.

ProviderError

The provider returned an error that is not described by other System.Web.Security.MembershipCreateStatus enumeration values.

Success

The user was successfully created.

UserRejected

The user was not created, for a reason defined by the provider.

Requirements

Namespace: System.Web.Security
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0