[Mono-devel-list] WebService + firebird working on xsp, but not on mod-mono

Juan Ramon jramon at sebal.net
Tue Oct 19 08:03:48 EDT 2004

I am trying to develop a simple Web Service with database access
The fact is that if I launch xsp and navigate to the test form, it works
correctly. If I do the same but with mod-mono, it returns:

	The remote server returned an error: (500) Internal Server 	Error.
	Unable to complete network request to host "".

I have checked that it happens just at the point I am filling the
I have tried using, localhost and a real IP as the "server"
parameter in FbConnection and the result is the same...

Any ideas?
The sourcecode is as follows...


Juan Ramon Gonzalez

<%@ WebService Language="c#" Class="MyServices.Service1" %>
using System.Web.Services;
using FirebirdSql.Data.Firebird;
using System.Data;
namespace MyServices {

public class Service1 : System.Web.Services.WebService

	public bool AccessAllowed(string MAC)
		return testMAC(MAC);

	private bool testMAC(string MAC)
		FbConnection Conexion = new
		try {
			FbDataAdapter da = new FbDataAdapter("SELECT * FROM PC WHERE MAC='" +
MAC + "'", Conexion);
			DataSet ds = new DataSet();
			da.Fill(ds, "PC");
			foreach (DataRow row in ds.Tables["PC"].Rows) {

					if ((row["MAC"].ToString() == MAC) && (row["ALLOWED"].ToString() ==
"1")) {
					return true;
				} else {
					return false;


			return false;
		} finally {



More information about the Mono-devel-list mailing list