trying to compile code

0

Good afternoon and good evening.

I'm doing a group college project and know that the best thing to do is to play the code on a source code hosting platform for everyone to work well and in case we're using GitHub. Anyway, I created a Cadastro inside the code that is already in Git, but when I pull the code to use it in Visual Studio it happens what, I compile the code and I insert the data when I save the data it returns to Visual on Mapped with the following information:

This line appears in Mapped:

MySqlConnection conn = new 
MySqlConnection(ConfigurationManager.AppSettings["strConexao"]);
        conn.Open();
        return conn;

And this message at the end of the line:

*MySql.Data.MySqlClient.MySqlException: 'the host localhost does nor support 
 SSL connections.'

What can it be?

    
asked by anonymous 12.10.2018 / 23:22

1 answer

0

Your Host does not support SSL connection, so you have to make this explicit in your connection string. To use mysql without Ssl you have to set the SslMode = none parameter, just like the example below. From what I saw in your code this change should be made to your strConnection .

Server=ip_servidor;Database=database_name;Uid=User_Name;Pwd=Password;SslMode=none;
    
15.10.2018 / 12:05