I am currently using HDI Membership provider and the design looks as shown below:
<
Your insert statement is incorrect - since you are not specifying any field names you should be supplying values for all columns.
The fix is to supply the names of the columns you are insert into.
The screenshot also shows that there is a required ApplicationName
column, so unless it has a DEFAULT
defined, you will need to supply that as well.
Assuming you have a DEFAULT
defined on ApplicationName
:
cmd.CommandText = "INSERT INTO Users ( Username, Password, Email, PasswordQuestion, PasswordAnswer) VALUES(@Username,@Password,@Email,@PasswordQuestion,@PasswordAnswer)"