I am writing my first Windows 10 Universal application that runs in a MySql database. I used the code from this guide (it is for Windows 8 apps):
https://blogs.oracle.com/MySqlOnWindows/entry/how_to_using_connector_net
But when I try to open a connection to my database, I get an error message:
An exception of type "System.NotImplementedException" occurred in> MySql.Data.RT.dll, but was not processed in the user code
Additional Information: SSL is not supported in this version of WinRT.
public class DBconnector { static string server = "127.0.0.1"; static string database = "hurtownia"; static string user = "root"; static string pswd = "root"; public static bool login(string email, string password) { string connectionString = "Server = " + server + ";database = " + database + ";uid = " + user + ";password = " + pswd + ";"; using (MySqlConnection connection = new MySqlConnection(connectionString)) { connection.Open(); MySqlCommand checkLogin = new MySqlCommand("select password_hash, password_salt from users where email = \""+email+"\"",connection); using (MySqlDataReader reader = checkLogin.ExecuteReader()) { reader.Read(); string hash = reader.GetString("password_hash"); string salt = reader.GetString("password_salt"); bool result = passwordGenerator.compare(password, hash, salt); if (result) return true; else return false; } } } }
So my question is how to fix this and connect correctly to the MySql database in the Windows 10 Universal App.
c # mysql win-universal-app
Bartosz karpiΕski
source share