Error Throwing in Web Service

I didn't realize that error handling for HTTP requests got to the web service level.  If you've deployed an app to a remote server that gets an error, you found that the error handling capabilities provided in the <customErrors> element in the config file catch the error and redirect to the error page (if this element is setup to do so; you can also catch errors in the Page_Error event).

What I found out was that errors in web service calls to the client side also get filtered out on a remote server.  The error comes back as a 500 error with a generic message.  ASP.NET AJAX is smart enough to handle failures and respond accordingly, but those errors get caught on the server and a generic gets sent to the client.

I found this out because I was displaying the error message and using exception throwing as a validation of sorts, displaying the message in the client.  This didn't work however.

Published Saturday, January 31, 2009 4:15 PM by bmains
Filed under:

Comments

No Comments