I am writing an ASP.NET web service and am throwing a SoapException with a message:
throw new SoapException("BANG!", SoapException.ClientFaultCode);
When I create an ASP.NET client, and request a label to display the SoapException.Message property, it displays a message similar to the following:
System.Web.Services.Protocols.SoapException: BANG! at WebServiceException.WebService1.HelloWorld() in [DIRECTORY]\WebService1.asmx.cs:line 23
Is there an easy way to simply be presented with the message BANG! rather than this entire string? Or should I just use regular expressions?