I am writing an ASP.NET web service and throwing a SoapException with the 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! in WebServiceException.WebService1.HelloWorld () in [DIRECTORY] \ WebService1.asmx.cs: line 23
Is there an easy way to just submit a BANG message! not the whole line? Or should I just use regular expressions?
source share