Using connection sting in class
Time I spent now is more then 30 seconds, default value.
Need to setup conection life time or Conection time out
Need help
- string server = ConfigurationManager.AppSettings["server"].ToString();
- string username = ConfigurationManager.AppSettings["username"].ToString();
- string password = ConfigurationManager.AppSettings["password"].ToString();
- string database = ConfigurationManager.AppSettings["database"].ToString();
- // string conection = ConfigurationManager.AppSettings["connection time"].ToString();
- conn = new MySqlConnection(@"server=" + server + ";userid=" + username + ";"
- + "password=" + password + ";database=" + database);
Code
OR- conn = new MySqlConnection("Data Source='192.168.1.135';Port=3306;Database='prijavnica_app';UID='prijavnica';PWD='prijavnica'; Connect Timeout=120;");

Jaimin ShethiyaRank #177 · 13.7K reputationPosted Oct 1, 2019, 9:44 PM EDT
I think you have to set the timeout when you have to fetch the data in database.
here the code for that, can you please check it.
let me know if you have needed any other help from myside.
Thanks
Goran BibicRank #993 · 2K reputationPosted Oct 1, 2019, 10:18 PM EDT
Another?
Mageshwaran RRank #411 · 6.1K reputationPosted Nov 25, 2019, 5:09 AM EST