Public Sub CreateUser_OnClick(sender As Object, args As EventArgs) If the problem persists, please contact your system administrator." Return "The user creation request has been canceled. If the problem persists, please contact your system administrator." Ĭase MembershipCreateStatus.UserRejected: Return "The authentication provider returned an error. Please check the value and try again." Ĭase MembershipCreateStatus.ProviderError: Return "The password retrieval question provided is invalid. Please check the value and try again." Ĭase MembershipCreateStatus.InvalidQuestion: Return "The password retrieval answer provided is invalid. Please check the value and try again." Ĭase MembershipCreateStatus.InvalidAnswer: Return "The email address provided is invalid. Please enter a valid password value." Ĭase MembershipCreateStatus.InvalidEmail: Return "The password provided is invalid. Please enter a different email address." Ĭase MembershipCreateStatus.InvalidPassword: Return "A username for that email address already exists. Please enter a different user name." Ĭase MembershipCreateStatus.DuplicateEmail: Public string GetErrorMessage(MembershipCreateStatus status)Ĭase MembershipCreateStatus.DuplicateUserName: Msg.Text = GetErrorMessage(e.StatusCode) "Your temporary password is " + password + "." Msg.Text = "User " + Server.HtmlEncode(UsernameTextbox.Text) + " created. MembershipUser newUser = Membership.CreateUser(UsernameTextbox.Text, password, String password = Membership.GeneratePassword(12, 1) Generate a new 12-character password with at least 1 non-alphanumeric character. Public void CreateUser_OnClick(object sender, EventArgs args) For more information, see Script Exploits Overview. By default, ASP.NET Web pages validate that user input does not include script or HTML elements. This example contains a text box that accepts user input, which is a potential security threat.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |