I had a project done in MSSQL. I migrated MSSQL to MySql because i thought Webmatrix.WebData will support MySql also. WebSecurity initialiation was successful.
if (!WebSecurity.Initialized)
{
securityService.Initialize(
"sqlserver",
"UserProfile",
"UserId"
"UserName");
};`
Above code executed successfully. But if fails to execute the following part,
if (!WebSecurity.UserExists("user"))
{
WebSecurity.CreateUserAndAccount("user", "password");
}
The check WebSecurity.UserExists("user")
is failing. This is the error message-
An exception of type 'MySql.Data.MySqlClient.MySqlException' occurred in MySql.Data.dll but was not handled in user code
Additional information: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '[UserId] FROM [UserTable] WHERE (UPPER([UserName]) = UPPER('user'))' at line 1
Please help me with this issue.