The code for the custom registration interface has been mentioned in the previous blog. When I tested it again today, I found that the user password created today is in the MD5 format, which shows my web. the default membership defaultprovider in config is modified to mysqlmembershipprovider,
The following code is displayed on the testcreateusers. ASPX page:
Membershipuser newuser = membership. createuser (usernametextbox. Text, passwordtextbox. Text, <br/> emailtextbox. Text, passwordquestion, <br/> passwordanswer, true, out status );
Actually, it is called in my custom mysqlmembershipprovider
Public override membershipuser createuser (string username, <br/> string password, <br/> string email, <br/> string passwordquestion, <br/> string passwordanswer, <br/> bool isapproved, <br/> Object provideruserkey, <br/> out membershipcreatestatus status)
Question 1:
Although I don't know what the problem is, I didn't even add mysqlmembershipprovider in testcreateusers. aspx, and I don't know how it was found.
Question 2:
As mentioned in the previous blog, user information is not added to the users table.
Question 3:
This problem has been solved. Record the error Solution Process
Originally, we thought we would use the method in mysqlmembershipprovider. Therefore, we first defined the msmp object of mysqlmembershipprovider, and then called other methods through this object, such as in testcreateusers. the requiresquestionandanswer and createuser () methods in aspx report the following error if requiresquestionandanswer is set to false:
The password retrieval answer provided is invalid. Please check the value and try again
When I change requiresquestionandanswer to true, the user information can be written to the database, but an error will still be reported. Later, this is the case mentioned above. I will not change it at all, I didn't expect this createuser to be associated with the Web. in config, membership defaprovider provider automatically converts my encryption method to MD5 mode, and writes the data to the database correctly. No error is reported.
Things to be solved
The users table is associated with the aspnet_users and aspnet_membership tables.