asp.net and mysql connection problems

diesel543

New Member
Messages
4
Reaction score
0
Points
0
Hi I am a newbie to asp.net and mysql, but I am getting the following
error in an ASP.NET page when trying to connect to a mySQL database.
I have got this working locally no problem. I have created the database
tables and created a bin folder and uploaded the MySql.Data.dll file.
The connection string I am using is:

myConnection = New MySqlConnection("server=localhost; user id=xxxxxxx;
password=yyyyy; database=zzzzz; pooling=false;")

Any ideas? Thanks.
Server Error in '/' Application

Exception of type 'System.Exception' was thrown.

Description: HTTP 500. Error processing request.
Stack Trace:
System.Exception: Exception of type 'System.Exception' was thrown.
at MySql.Data.MySqlClient.NativeDriver.Open () [0x00000] Version information: Mono Version: 2.0.50727.1433; ASP.NET Version: 2.0.50727.1433
 

freecrm

New Member
Messages
629
Reaction score
0
Points
0
Err.. not sure about this, but doesn't MySQL work with php, not asp? I thought asp was for SQL??
 

freecrm

New Member
Messages
629
Reaction score
0
Points
0
hi freecrm - asp.net can happily work with mySQL

Hi diesel - its good to be back (for a bit anyway!)

Never knew asp was OK with SQL - makes sense though seeing as the structure is pretty similar and all!
 

diesel543

New Member
Messages
4
Reaction score
0
Points
0
I am wondering if it is related to the mysql connector which is used? I have used MySQL Connector 5.0.9, is this compliant? Does anyone have any recommendations?
 

xav0989

Community Public Relation
Community Support
Messages
4,467
Reaction score
95
Points
0
You could try building your website inside VS with the dll inside the bin folder. Maybe that is going to make it work.

If it still doesn't work, try to connect to mysql using php to check if the asp connector or the server is misbehaving.
 

diesel543

New Member
Messages
4
Reaction score
0
Points
0
Hi xav0989. thanks for you response. I can publish to others folder inside and outside of VS (and another pc just to be sure), but I don't think x10 likes the connector I am using, I have tried using older and newer connectors with no luck, would be nice to know what is the recommended one, or if there is a different approach. Otherwise I will have to try another hosting provider.
 
Top