No, throwing exceptions from web services is not good practice, since .NET Exceptions (like ArgumentException ) does not support cross-platform (think about how the Java client should respond).
The standard mechanism for specifying exceptions in web services is Soap Error .
With .asmx throwing a SOAPException will throw an error.
If you go to WCF, you can look at FaultContracts .
To improve debugging of remote exceptions between the .Net client and the .Net server, you can spoof and send an exception through the wire using includeExceptionDetailInFaults in your config. The exception itself must be serializable for this to work. However, you will want to disable this before your system achieves performance.
On the sidelines, you will often find that if the calling SOAP request call of the caller is too poorly formed (for example, if your arguments include objects that cannot be deserialized) that your WebMethod will not be called at all - the caller will just get an error (often quite cryptic).
The above errors caused by invalid arguments to call the client to your service should be generated when checking the arguments to the call.
Perhaps related - after the request has passed the check, for your own approval of the state of the internal system, you can also use Code Contracts to detect internal errors (or, possibly, missing checks that should have happened earlier). However, they will not be transferred to the client.
source share