[Mono-aspnet-list] how to get correct stack from asmx web service

Andrus kobruleht2 at hot.ee
Mon Oct 5 16:12:17 EDT 2009


Asmx web service Web method:

[WebMethod()]
 public void Test() {
   throw new Exception("TESTEXCept");
}

In Mono 2.4 it returns strange stack trace:

System.Exception: TESTEXCept
  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke 
(object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags 
invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, 
System.Globalization.CultureInfo culture) [0x00057] in 
/root/src/mono-2.4.2.2/mcs/class/corlib/System.Reflection/MonoMethod.cs:159

In .NET it returns correct stack trace:

System.Web.Services.Protocols.SoapException: Server was unable to process 
request. ---> System.Exception: TESTEXCept
   at Service.Test()
   --- End of inner exception stack trace ---

How to obtain correct stack trace in Mono ?

Andrus.



More information about the Mono-aspnet-list mailing list