Hi DarylO,
When you are calling a webservice from the clientside the return value will be in JSON (indeed not soap). When you receive an error from the webservice could mean that while processing you request something went wrong. You can handle the exception on the serverside inside your webservice. As far as i know it's impossible to handle exceptions on the client side (which means wrintin in the eventlog). you can present your errors in an alert box. something like this:
MyWebService.HelloWorld(
OnComplete, OnError);function
OnError(result){
alert(
"Error: " + result.get_message());}
Hope this helps!
Regards,
Hi Dennis,
I appreciate your response.
I'm currently catching errors on the client side and displaying an alert box with a user-friendly message of some sort, so that part is covered.
On the server side we do our best to account for all potential errors however there is still the possibility of an unexpected error not getting caught.
Currently I have been tasked with providing our other developers with a framework they can add into their projects that will catch and log unhandled exceptions to the event log as well as provide trace output for web service and database calls. The soap extension works well as long as the web service is talking soap (we have disabled httpget and httppost).
I'll have to do a bit more digging into how the scriptmanager calls web services and determine if there is in fact a way to implement something similar to what we have for the soap extension.
Hi DarylO,
Why are you writing a framework to handle exceptions while you can use Enterprise Library? There is a block ExceptionHandling and ExceptionHandling.Logging. When you are going to do some research at the scriptmanager i think you have to look at the WebRequestmanager class and the PageRequestmanager class. Succes!
Regards,
No comments:
Post a Comment