<add name="carmenrichter_gx2DataContextConnectionString" connectionString="User Id=xxxxx;Password=pw;Host=host_ip=carmenrichter_gx2;Persist Security Info=True;Ping Interval=240" />
This is the connection String. The host is a remote webserver.
What ever i do, i get the timeout ....
_product = GlobalData.RemoteDataContext.Products.SingleOrDefault(x => x.ProductsId == SelectedNI);
in things like that.
Lost connection to MySQL server during query
Re: Lost connection to MySQL server during query
Set bigger value (by default, 30) in the Default Command Timeout connection string parameter.
Note that FirstOrDefault is faster than SingleOrDefault: https://stackoverflow.com/questions/318 ... ne-element.
Note that FirstOrDefault is faster than SingleOrDefault: https://stackoverflow.com/questions/318 ... ne-element.