Page 1 of 1

Lost Connection During Mysql query

Posted: Fri 11 Jul 2008 02:39
by KW
I am using IIS7 and mysql membership to authenticate. Many times when IIS7 goes to authenticate it will fail with this message:

Lost Connection During Mysql query

It basically times out trying to validate the user name and password from the database. Is there any known issues reguarding using mysql membership? This is a periodic problem. Here is the connection string:



I'm trying to use IIS7, WCF and datasets with your mysql component to setup an N-tier scenario with mysql as the backend. I'm not having very much luck.

Posted: Tue 15 Jul 2008 11:43
by AndreyR
Hello, KW.

We are testing our products with IIS 7.0.
Some problems were revealed, and are being investigated now. Please wait for the results.

Reagrds, Andrey.

Posted: Wed 23 Jul 2008 00:31
by KW
AndreyR wrote:Hello, KW.

We are testing our products with IIS 7.0.
Some problems were revealed, and are being investigated now. Please wait for the results.

Reagrds, Andrey.
I have resolved my problem - or at least it has been working correctly for me for the last week now.

Basically, I am using the tableadapters.

Code: Select all

TabeAdapter.ATableadapter myadapter = new TabeAdapter.ATableadapter();

myadapter.Update( dataset);
I used to use the code above but I stopped. Now I explicitly create the connection and assign it to the TableAdapter. And after, I make sure it is closed. Doing this resolved my issue. I haven't had a problem since.

Code: Select all

TabeAdapter.ATableadapter myadapter = new TabeAdapter.ATableadapter();

MySqlConnection acon = new MySqlConnection();
acon = "SomeConnection";

myadapter.Connection = acon;

myadapter.Update( dataset);

if ( acon.Sate == Open ) {con.Close()}     


When I was debugging I seeing that the connection wasn't being closed properly. It could be something else. But this has fixed it for now for us.