Why the connection to the MySql database is disconnected after 20 seconds "Connection must be valid and open" If I do not do this time in the program. As I learned that the timeout on the hosting is 20 seconds. Then how to maintain the connection?
private async Task LoadStudentsAsync1() { string connStr = "Server = sql221.maidf.eu; Database = u983222dfa; Uid = u983222asd; Pwd = themdf;"; // строка подключения к БД sqlConnection = new MySqlConnection(connStr); // создаём объект для подключения к БД await sqlConnection.OpenAsync(); // устанавливаем соединение с БД await LoadStudentsAsync(); }