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);
OR
- conn = new MySqlConnection("Data Source='192.168.1.135';Port=3306;Database='prijavnica_app';UID='prijavnica';PWD='prijavnica'; Connect Timeout=120;");
Mageshwaran RPosted Nov 25, 2019, 10:09 AM
Goran BibicPosted Oct 2, 2019, 2:18 AM
Another?
Jaimin ShethiyaPosted Oct 2, 2019, 1:44 AM
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