Exceptions in applications are common. How they are handled differentiates the good applications from the bad ones. In case of services, the exceptions should be communicated to the clients so that clients can take the appropriate action. For WCF services, handling the exceptions become more important as compared to the other applications. The reason is that once an exception occurs, the underlying channel goes into the faulted state, and hence the server and client will not be able to communicate with each other. In WCF, this can be achieved using
In this recipe, we will enhance the ping server by adding a check for the null string passed as the value ...