Page 1 of 4 123 ... LastLast
Results 1 to 10 of 38

Thread: ASP.NET 2 connection to MySQL - me too

  1. #1
    Join Date
    Dec 2005
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default ASP.NET 2 connection to MySQL - me too

    Like captain's recent thread, or creativework's "asp.net dp connection" thread, I'm having problems with a MySQL database.

    My site is a minor variation on the 'personal website template' provided with VWD 2005 Express. As such it has 2 MySQL databases, I believe one for logons and one for photos. The whole site works fine locally, but when uploaded "as is" (to an RFH site with asp.net support) it fails with a security error, part of which is copied below.

    I gather that I have to do something to enable this to work on the real site, but I've no idea what. Most of the stuff in the aforementioned threads might as well be in Chinese for all it means to me. Likewise the advice in the error message to "review the stack trace". So: is the process of getting a site that works locally to work remotely simple, and if so could someone detail the steps for me; or is it complex, and if so what do I need to read to understand the process?

    Thanks

    The error:

    Server Error in '/' Application.

    An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Data.SqlClient.SqlException: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

  2. #2
    Join Date
    Feb 2004
    Posts
    4,901
    Thanks
    2
    Thanked 134 Times in 113 Posts

    Default

    System.Data.SqlClient- isnt that for SQL Server only?
    Warren Ashcroft
    Red Fox UK Limited - Pioneers in Internet Technology
    http://www.redfoxuk.com
    w.ashcroft [at] redfoxuk.com

    NOTE: Forum Private Messaging should not be used to contact staff with support queries.

  3. #3
    Join Date
    Dec 2005
    Posts
    193
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by Warren Ashcroft
    System.Data.SqlClient- isnt that for SQL Server only?
    When connecting to SQL Server 2005
    Looks like it
    Schofieldandwhite.com: RFH reseller

  4. #4
    Join Date
    Jun 2005
    Posts
    1,081
    Thanks
    4
    Thanked 15 Times in 15 Posts

    Default

    I think the big issue here is the Membership database as out-of-the-box ASP.Net v2 does not have a provider for mySQL. I'm not even sure if there is an MS Access provider for this (having seen the queries made to by the webpart framework I would never try and use this with MS Access).

    The default SQL Providers will require Microsoft SQL Server as they utilize Stored Procedures. The easiest way to set-up the Membership Tables is to run ASPNET_REGSQL.EXE from your local machine and enter the RFH SQL Server details to have it connect and create the tables on the RFH Server.

    The ASPNET_REGSQL.EXE should be located in %system_root%\Microsoft.Net\Framework\v2.0.50727

  5. #5
    Join Date
    Jan 2006
    Location
    Ireland
    Posts
    65
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Why don't install the MySql Net Connector? It works wery well
    Cheers
    Pino

  6. #6
    Join Date
    Feb 2004
    Posts
    4,901
    Thanks
    2
    Thanked 134 Times in 113 Posts

    Default

    The current (working) way to use MySQL is to use .NET v2 and the ODBC driver (see www.connectionstrings.com for help).
    Warren Ashcroft
    Red Fox UK Limited - Pioneers in Internet Technology
    http://www.redfoxuk.com
    w.ashcroft [at] redfoxuk.com

    NOTE: Forum Private Messaging should not be used to contact staff with support queries.

  7. #7
    Join Date
    Jan 2006
    Location
    Ireland
    Posts
    65
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by Warren Ashcroft
    The current (working) way to use MySQL is to use .NET v2 and the ODBC driver (see www.connectionstrings.com for help).
    Yep, that works anyway But think about the NEt Connector... is free and works fine. I've used it in an huge project (Automotive DMS) written in .Net v.2, and works really fine

    Cheers
    Pino

  8. #8
    Join Date
    Jun 2005
    Posts
    1,081
    Thanks
    4
    Thanked 15 Times in 15 Posts

    Default

    Quote Originally Posted by Warren Ashcroft
    The current (working) way to use MySQL is to use .NET v2 and the ODBC driver (see www.connectionstrings.com for help).
    For those that need to use the Membership API this link may prove useful:

    http://www.codeproject.com/aspnet/My...ipProvider.asp

  9. #9
    Join Date
    Feb 2004
    Posts
    4,901
    Thanks
    2
    Thanked 134 Times in 113 Posts

    Default

    Quote Originally Posted by pino
    Yep, that works anyway But think about the NEt Connector... is free and works fine. I've used it in an huge project (Automotive DMS) written in .Net v.2, and works really fine

    Cheers
    Pino
    Last time I remember, we couldnt install the MySQL NET Connector into thr GAC because it wasnt strong-named.
    Warren Ashcroft
    Red Fox UK Limited - Pioneers in Internet Technology
    http://www.redfoxuk.com
    w.ashcroft [at] redfoxuk.com

    NOTE: Forum Private Messaging should not be used to contact staff with support queries.

  10. #10
    Join Date
    Jan 2006
    Location
    Ireland
    Posts
    65
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by Warren Ashcroft
    Last time I remember, we couldnt install the MySQL NET Connector into thr GAC because it wasnt strong-named.
    yep, in my project I recompiled the source adding the signing key but the GAC doesn't require a sn sig to add an assembly, anyway the Setup of the MySql Net Connector registers the component.

    Cheers
    Pino

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. MySQL 5 Connection String
    By bracora.com in forum ASP.NET
    Replies: 1
    Last Post: 16th May 2006, 02:37 PM
  2. asp.net connection to mysql
    By keyur_ptl in forum ASP.NET
    Replies: 1
    Last Post: 27th January 2006, 11:26 AM
  3. ASP.NET 2 connection to MySQL
    By captain in forum ASP.NET
    Replies: 4
    Last Post: 27th December 2005, 07:07 PM
  4. asp.net db connection
    By creativeworks in forum ASP.NET
    Replies: 34
    Last Post: 8th November 2005, 03:53 PM
  5. Connection to MySql using ASP / JScript
    By JohnHorne in forum ASP (VBScript)
    Replies: 2
    Last Post: 17th July 2005, 05:36 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •