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 |