I have a simple web service operation like this one:
[WebMethod]
public string HelloWorld()
{
throw new Exception(\"HelloWorldException\"
It IS possible!
Service operation example:
try
{
// do something good for humanity
}
catch (Exception e)
{
throw new SoapException(e.InnerException.Message,
SoapException.ServerFaultCode);
}
Client consuming the service:
try
{
// save humanity
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
Just one thing - you need to set customErrors mode='RemoteOnly' or 'On' in your web.config (of the service project).
credits about the customErrors discovery - http://forums.asp.net/t/236665.aspx/1