User-1330468790 posted
Hi shajigeorge,
It seems like the exception should be thrown by Membership.CreateUser() rather than UpdateUser().
The UpdateUser method will only throw ArgumentNullException and the CreateUser method will be able to give a MembershipCreateUserException which
contains MembershipCreateStatus Enum. In the enumeration, you could find below code and status.
DuplicateEmail 7
The email address already exists in the database for the application.
DuplicateProviderUserKey 10
The provider user key already exists in the database for the application.
DuplicateUserName 6
The user name already exists in the database for the application.
InvalidAnswer 4
The password answer is not formatted correctly.
InvalidEmail 5
The email address is not formatted correctly.
InvalidPassword 2
The password is not formatted correctly.
InvalidProviderUserKey 9
The provider user key is of an invalid type or format.
InvalidQuestion 3
The password question is not formatted correctly.
InvalidUserName 1
The user name was not found in the database.
ProviderError 11
The provider returned an error that is not described by other MembershipCreateStatus enumeration values.
Success 0
The user was successfully created.
UserRejected 8
The user was not created, for a reason defined by the provider.
Could you please share the detailed error/exception message?
Moreover, if you are using forms authentication with membership, I suggest you use ASP.NET Identity. According to Microsoft, the former ASP.NET Membership has been replaced with ASP.NET Identity.
Hope this can help you.
Best regards,
Sean