+ Reply to Thread
Results 1 to 7 of 7

Thread: asp.net and mysql connection problems

  1. #1
    diesel543 is offline x10Hosting Member diesel543 is an unknown quantity at this point
    Join Date
    Aug 2009
    Posts
    4

    asp.net and mysql connection problems

    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

  2. #2
    freecrm's Avatar
    freecrm is offline x10 Elder freecrm is an unknown quantity at this point
    Join Date
    May 2008
    Location
    UK
    Posts
    629

    Re: asp.net and mysql connection problems

    Err.. not sure about this, but doesn't MySQL work with php, not asp? I thought asp was for SQL??

  3. #3
    diesel543 is offline x10Hosting Member diesel543 is an unknown quantity at this point
    Join Date
    Aug 2009
    Posts
    4

    Re: asp.net and mysql connection problems

    Quote Originally Posted by freecrm View Post
    Err.. not sure about this, but doesn't MySQL work with php, not asp? I thought asp was for SQL??
    hi freecrm - asp.net can happily work with mySQL

  4. #4
    freecrm's Avatar
    freecrm is offline x10 Elder freecrm is an unknown quantity at this point
    Join Date
    May 2008
    Location
    UK
    Posts
    629

    Re: asp.net and mysql connection problems

    Quote Originally Posted by diesel543 View Post
    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!

  5. #5
    diesel543 is offline x10Hosting Member diesel543 is an unknown quantity at this point
    Join Date
    Aug 2009
    Posts
    4

    Re: asp.net and mysql connection problems

    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?

  6. #6
    xav0989's Avatar
    xav0989 is offline Community Public Relation xav0989 is just really nice
    Join Date
    Jul 2008
    Location
    ifk
    Posts
    4,438

    Re: asp.net and mysql connection problems

    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.
    Xavier L | Community Public Relations Manager (Free Hosting Support)
    █ Yes, my position is too cool to even exist!
    How am I helping? Rate this post by clicking the icon below! (this is even better than "liking" a post)
    Terms of Service | Acceptable Use Policy | x10Hosting Wiki

  7. #7
    diesel543 is offline x10Hosting Member diesel543 is an unknown quantity at this point
    Join Date
    Aug 2009
    Posts
    4

    Re: asp.net and mysql connection problems

    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.

+ Reply to Thread

Similar Threads

  1. [PHP] MySQL and PHP
    By Bryon in forum Tutorials
    Replies: 43
    Last Post: 03-24-2011, 07:27 AM
  2. MySQL Connection Problems
    By xevell in forum Free Hosting
    Replies: 1
    Last Post: 03-25-2009, 11:24 PM
  3. Replies: 14
    Last Post: 09-29-2008, 07:07 PM
  4. New Site-Suggestions?
    By mnoutside in forum Review My Site
    Replies: 9
    Last Post: 08-27-2008, 07:01 AM
  5. MySQL - another one with connection problems
    By norbyte in forum Free Hosting
    Replies: 2
    Last Post: 11-30-2007, 07:42 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers