[Mono-dev] ByteFX not working on Mono

Ko Ko kkl_sg at yahoo.com
Thu Sep 29 05:12:35 EDT 2005


Hi,
 
I use ByteFX for my webservices and it cannot connect to database on Mono on Linux. I can actually connect to database when I use ByteFX Windows with .net framework. The webservices gives me this message on Linux
 
The remote server returned an error: (500) Internal Server Error. Unable to connect to any of the specified MySQL hosts
 
What would be the problem? Do I need to configure something or change any file permission or whatever on Linux? 
 
I attach my code which is 100% working on Windows Platform. Can anyone suggest me why this error occurred?
 

using System;

using System.Collections;

using System.ComponentModel;

using System.Data;

using System.Diagnostics;

using System.Web;

using System.Web.Services;

using ByteFX.Data.MySqlClient;

namespace ws

{

/// <summary>

/// Summary description for Service1.

/// </summary>

public class Fotohub : System.Web.Services.WebService

{

public Fotohub()

{

//CODEGEN: This call is required by the ASP.NET Web Services Designer

InitializeComponent();

}

#region Component Designer generated code



//Required by the Web Services Designer 

private IContainer components = null;



/// <summary>

/// Required method for Designer support - do not modify

/// the contents of this method with the code editor.

/// </summary>

private void InitializeComponent()

{

}

/// <summary>

/// Clean up any resources being used.

/// </summary>

protected override void Dispose( bool disposing )

{

if(disposing && components != null)

{

components.Dispose();

}

base.Dispose(disposing); 

}



#endregion

 

[WebMethod]

public DataSet GetUserInfo()

{

string connectionString= "server=192.168.0.83; uid=koko; pwd=90087644; database=FotoWS";

string query= "Select * From user";

DataSet dataset=new DataSet();

MySqlConnection conn = new MySqlConnection(connectionString);

MySqlDataAdapter adapter = new MySqlDataAdapter();

adapter.SelectCommand = new MySqlCommand(query, conn);

adapter.Fill(dataset);

return dataset;

}

}

}

 

Regards,

Ko Ko






Reality starts with Dream 

		
---------------------------------
Yahoo! for Good
 Click here to donate to the Hurricane Katrina relief effort. 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20050929/14cccabf/attachment.html 


More information about the Mono-devel-list mailing list