Beispiel #1
0
        private static string ErrorCodeToString(FlexMembershipStatus createStatus)
        {
            // See http://go.microsoft.com/fwlink/?LinkID=177550 for
            // a full list of status codes.
            switch (createStatus)
            {
            case FlexMembershipStatus.DuplicateUserName:
                return("User name already exists. Please enter a different user name.");

            case FlexMembershipStatus.DuplicateEmail:
                return("A user name for that e-mail address already exists. Please enter a different e-mail address.");

            case FlexMembershipStatus.InvalidPassword:
                return("The password provided is invalid. Please enter a valid password value.");

            case FlexMembershipStatus.InvalidEmail:
                return("The e-mail address provided is invalid. Please check the value and try again.");

            case FlexMembershipStatus.InvalidAnswer:
                return("The password retrieval answer provided is invalid. Please check the value and try again.");

            case FlexMembershipStatus.InvalidQuestion:
                return("The password retrieval question provided is invalid. Please check the value and try again.");

            case FlexMembershipStatus.InvalidUserName:
                return("The user name provided is invalid. Please check the value and try again.");

            case FlexMembershipStatus.ProviderError:
                return("The authentication provider returned an error. Please verify your entry and try again. If the problem persists, please contact your system administrator.");

            case FlexMembershipStatus.UserRejected:
                return("The user creation request has been canceled. Please verify your entry and try again. If the problem persists, please contact your system administrator.");

            default:
                return("An unknown error occurred. Please verify your entry and try again. If the problem persists, please contact your system administrator.");
            }
        }
Beispiel #2
0
        private static string ErrorCodeToString(FlexMembershipStatus createStatus)
        {
            // See http://go.microsoft.com/fwlink/?LinkID=177550 for
            // a full list of status codes.
            switch (createStatus)
            {
                case FlexMembershipStatus.DuplicateUserName:
                    return "User name already exists. Please enter a different user name.";

                case FlexMembershipStatus.DuplicateEmail:
                    return "A user name for that e-mail address already exists. Please enter a different e-mail address.";

                case FlexMembershipStatus.InvalidPassword:
                    return "The password provided is invalid. Please enter a valid password value.";

                case FlexMembershipStatus.InvalidEmail:
                    return "The e-mail address provided is invalid. Please check the value and try again.";

                case FlexMembershipStatus.InvalidAnswer:
                    return "The password retrieval answer provided is invalid. Please check the value and try again.";

                case FlexMembershipStatus.InvalidQuestion:
                    return "The password retrieval question provided is invalid. Please check the value and try again.";

                case FlexMembershipStatus.InvalidUserName:
                    return "The user name provided is invalid. Please check the value and try again.";

                case FlexMembershipStatus.ProviderError:
                    return "The authentication provider returned an error. Please verify your entry and try again. If the problem persists, please contact your system administrator.";

                case FlexMembershipStatus.UserRejected:
                    return "The user creation request has been canceled. Please verify your entry and try again. If the problem persists, please contact your system administrator.";

                default:
                    return "An unknown error occurred. Please verify your entry and try again. If the problem persists, please contact your system administrator.";
            }
        }
 public FlexMembershipException(FlexMembershipStatus statusCode)
 {
     this.StatusCode = statusCode;
 }
 public FlexMembershipException(FlexMembershipStatus statusCode)
 {
     this.StatusCode = statusCode;
 }