+ Reply to Thread
Results 1 to 5 of 5

Thread: ASP and MySQL - Connection refused

  1. #1
    antinonavk is offline x10Hosting Member antinonavk is an unknown quantity at this point
    Join Date
    Jan 2010
    Posts
    1

    Unhappy ASP and MySQL - Connection refused

    Hi all. Please help me. I run aspx site, but write error:

    Server Error in '/' Application
    --------------------------------------------------------------------------------
    Connection refused
    Description: HTTP 500. Error processing request.
    Stack Trace:
    System.Net.Sockets.SocketException: Connection refused
    at System.Net.Sockets.Socket.Connect (System.Net.EndPoint remote_end) [0x00000]
    at System.Net.Sockets.Socket+Worker.Connect () [0x00000]
    --------------------------------------------------------------------------------
    Version information: Mono Version: 2.0.50727.1433; ASP.NET Version: 2.0.50727.1433

    My default.aspx:

    <%@ Page Language="C#" %>
    <%@ Import Namespace="System.Data" %>
    <%@ Import Namespace="MySql.Data.MySqlClient" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
    <title>CD cat</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <script runat="server">
    private void Page_Load(Object sender, EventArgs e)
    {
    string connectionString = "server=localhost;Database=antinona_db;userid=anti non_ad;password=x;Pooling= false;";
    MySqlConnection dbcon = new MySqlConnection(connectionString);
    dbcon.Open();
    Response.Write("dbcon.State.ToString()");
    dbcon.Close();
    dbcon = null;


    }
    </script>
    </head>
    <body>
    <h1>Artists</h1>
    </body>
    </html>

    My web.config:

    <?xml version="1.0" ?>
    <configuration>
    <appSettings />
    <connectionStrings />
    <system.web>
    <customErrors mode="Off" />
    </system.web>
    </configuration>
    <configuration>
    <system.web>
    <compilation>
    <assemblies>
    <add assembly="MySql"/>
    <add assembly="MySql.Data"/>
    </assemblies>
    </compilation>
    </system.web>
    </configuration>

    File mysql.data.dll (version 6.2 - .Net and mono) in /public_html/bin.

    Please help me.:dunno:

  2. #2
    tricky1090 is offline x10Hosting Member tricky1090 is an unknown quantity at this point
    Join Date
    Feb 2010
    Posts
    1

    Re: ASP and MySQL - Connection refused

    I have exactly the same issue. Anyone?

  3. #3
    alexandrefc is offline x10Hosting Member alexandrefc is an unknown quantity at this point
    Join Date
    Mar 2010
    Posts
    2

    Re: ASP and MySQL - Connection refused

    Hi... I have a same problem with my aplication... anyone know resolve?

    tks all

  4. #4
    nwinteractive is offline x10Hosting Member nwinteractive is an unknown quantity at this point
    Join Date
    May 2010
    Posts
    6

    Re: ASP and MySQL - Connection refused

    I have the same issue as well. But my page is coded in VB.Net. Someone please help us. Thanks.

  5. #5
    Submariner is offline x10Hosting Member Submariner is an unknown quantity at this point
    Join Date
    Dec 2007
    Location
    TN, USA
    Posts
    44

    Re: ASP and MySQL - Connection refused

    When you searched the forums before posting this did you located the tutorial at ASP.Net for Beginners? If not give it a try...

    James

+ Reply to Thread

Tags for this Thread

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