Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

MembershipCreateUserException::StatusCode Property

 

Gets a description of the reason for the exception.

Namespace:   System.Web.Security
Assembly:  System.Web.ApplicationServices (in System.Web.ApplicationServices.dll)

public:
property MembershipCreateStatus StatusCode {
	MembershipCreateStatus get();
}

Property Value

Type: System.Web.Security::MembershipCreateStatus

A MembershipCreateStatus enumeration value that describes the reason for the exception.

The StatusCode property enables you to determine why the MembershipCreateUserException was thrown and respond accordingly.

The following code example creates a new user for an ASP.NET application configured to use forms authentication and ASP.NET membership. If the user is not created successfully, the code catches the MembershipCreateUserException and displays the message specified in the StatusCode property.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 2.0
Return to top
Show:
© 2017 Microsoft