[Mono-list] webservice HTTP 500

Carl Olsen carl at carl-olsen.com
Sun Jul 10 20:05:49 EDT 2005

I'm not sure what's wrong, but I did have to remove the Src attribute to get
a web service working on my web site:


If you want to see all of my code for the two pages (Senators.asmx and
Senators.asmx.cs), let me know.


-----Original Message-----
From: mono-list-bounces at lists.ximian.com
[mailto:mono-list-bounces at lists.ximian.com] On Behalf Of James Fitzsimons
Sent: Sunday, July 10, 2005 7:22 AM
To: mono-list
Subject: Re: [Mono-list] webservice HTTP 500

Humm, still no luck. I've tried to make it even more simple.

My .asmx now looks like this:

<%@ WebService Language="C#" Class="Hello,Hello" %>

My Hello.cs code behind looks like this:

using System;
using System.Web.Services;

[WebService(Namespace="http://www.temprui.org", Description="A hello
world service")]
public class Hello : WebService
	public string HelloWorld() { return "Hello world!"; }

Compiled like this:

mcs -target:library -out:Hello.dll Hello.cs -r:System.Web.Services.dll

And I still get the System.TypeLoadException: Cannot load type
exception. I get this with mod_mono and xsp2.

Works perfectly if I move the C# code into the asmx file.

Am I being particularly stupid?

More information about the Mono-list mailing list