Page 1 of 1

MembershipCreateStatus Status Value

Posted: Tue 20 Jan 2009 16:57
by JORGEMAL
As you already know, the MembershipCreateStatus status value has a predefined set of possible values like "InvalidUserName", "DuplicateUserName", "InvalidEmail" and "Success" among others.

Is there a possibility that your framework code produces a status value different than those already defined by defalut?

If I have a SELECT CASE statement to test for all of the possible status values, do I need a CASE ELSE to detect an unknwown or unexpected result?

With respect,
Jorge Maldonado

Posted: Wed 21 Jan 2009 09:27
by Shalex
We use the System.Web.Security.MembershipCreateStatus enumeration.
Particularly the following values are used now:
  • MembershipCreateStatus.Success
    MembershipCreateStatus.InvalidQuestion
    MembershipCreateStatus.InvalidAnswer
    MembershipCreateStatus.InvalidUserName
    MembershipCreateStatus.InvalidPassword
    MembershipCreateStatus.ProviderError
    MembershipCreateStatus.DuplicateUserName
Probably all the System.Web.Security.MembershipCreateStatus values will be used in the feature. We will not return integer values different from the ones in the System.Web.Security.MembershipCreateStatus enumeration.