[Mono-list] Re: Simple web method always returns error 500 "Cannot cast from source type to destination type" SOLVED

Peter Wolf p_wol@hotmail.com
Sat, 7 Feb 2004 23:20:27 -0500


Hey,

I just figured that I forgot to add the inheratence from
System.Web.Services.WebService to my Test class.
Now it works!

strange but Microsoft's .NET works without this... hmm.

Anyway, have a great day

Peter



----- Original Message ----- 
From: "Peter Wolf" <p_wol@hotmail.com>
To: <mono-list@lists.ximian.com>
Sent: Saturday, February 07, 2004 3:20 PM
Subject: Simple web method always returns error 500 "Cannot cast from source
type to destination type"


> Hi .NET people,
>
>  I have created a simple web method just to test the webservice the mono
0.3
> It's compiled OK but the method returns the following:
>
>  The remote server returned an error: (500) Internal Server Error. Cannot
> cast from source type to destination type
>
> here is my code (test.asmx)
>
>  <%@ WebService Language="C#" class="Test"%>
> using System;
> using System.Web.Services;
>
>  public class Test
> {
>     [WebMethod]
>     public int test()
>     {
>          return 0;
>     }
> }
>
> Please help! Thanks!!!
>