I know that when there is an unhandled Exception in asmx that it generates a soapFault and returns it to the client. What I want to know is if there is a way to return a soapFault without throwing an exception. Throwing an exception is an expensive operation and I would like to avoid it if I can.
I know that when there is an unhandled Exception in asmx that it generates
Share
AFAIK there is no such option (short from building the complete XML/SOAP message yourself that is)… with WCF this could be slightly easier IMO
You can throw a
SoapExceptionand can customize it rather thoroughly: