I'm developing an application which consists of the following parts:
-A SQL Server database
-Web services which provide the communication between the client and server
The client which uses SOAP to communicate with the web services.
When a server side error occurs, the error the user sees on the client side is a Soap error. I can specify error text, but it is buried in the SOAP error. I made a little test app which consists of a web service and WPF window. When I have it throw an error, I get things along the line of:
In this example, I want the client application to display the error:
I specifically want to generate a custom error when the web services are unable to connect to the SQL Server. Instead of returning an intimidating error saying "unable to establish a connection because the server is unavailable or does not exist etc etc", I want it to say something along the lines of "The SQL Server is currently unavailable. Please check your Windows Services and make sure it is running."
The trick is, I want to do this without parsing the error message returned by the web server on the client side to determine which user friendly error to throw.
I'm looking at a couple different options, but I'm kind of just fishing around. If anyone could point me in a specific direction I would greatly appreciate it.
If you would like additional information or feel that this would be better off in a different section of the forums, please let me know.