Is there any way to put some restriction on password selection while creating new user with asp. net Membership.??
Condition Like
Password strength:
- Minimum of 8 characters, with character complexity enforced. ie: Not contain the user’s account name
- Be at least eight characters in length
- Contain characters from three of the following four categories:
English uppercase characters (A through Z)
English lowercase characters (a through z)
Base 10 digits (0 through 9)
Non-alphabetic characters (for example, !, $, #, %)
In this case, you need to make some modifications to your Web.config. Find the following section and change it accordingly
UPDATED
First, update your membership config section in web.config like following
Then, In your Account Controller, replace your Registration action(the one decorated with
[HttpPost]) with the following codeAnd finally add the code for OnValidatePassword below the Registration Action
Hope this can help you achieve what you want !!