The exception that is thrown when a user is not successfully created by a membership provider.
Assembly: System.Web.ApplicationServices (in System.Web.ApplicationServices.dll)
Initializes a new instance of theclass.
Initializes a new instance of the StatusCode value.class with the specified
Initializes a new instance of theclass with the supplied serialization information and context.
Initializes a new instance of the Message property to the supplied message parameter valueclass and sets the
Gets a collection of key/value pairs that provide additional user-defined information about the exception.(Inherited from Exception.)
Gets or sets a link to the help file associated with this exception.(Inherited from Exception.)
Gets or sets HRESULT, a coded numerical value that is assigned to a specific exception.(Inherited from Exception.)
Gets a message that describes the current exception.(Inherited from Exception.)
Gets or sets the name of the application or the object that causes the error.(Inherited from Exception.)
Gets a string representation of the immediate frames on the call stack.(Inherited from Exception.)
Gets a description of the reason for the exception.
Gets the method that throws the current exception.(Inherited from Exception.)
Determines whether the specified object is equal to the current object.(Inherited from Object.)
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)
Serves as the default hash function. (Inherited from Object.)
Populates a SerializationInfo with the data needed to serialize the target object.(Overrides Exception.GetObjectData(SerializationInfo, StreamingContext).)
Gets the runtime type of the current instance.(Inherited from Exception.)
Creates and returns a string representation of the current exception.(Inherited from Exception.)
An instance of the CreateUser operation fails.class is thrown when a
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.
The StatusCode property indicates the reason for the exception so you can handle it appropriately.
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 StatusCode property.and displays the message specified in the
This example contains a text box that accepts user input, which is a potential security threat. By default, ASP.NET Web pages validate that user input does not include script or HTML elements. For more information, see Script Exploits Overview.
Available since 2.0
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.