Application_Error and asmx Web Services

I just found out after tracking down a weird popup alert error “Object reference not set to an instance of an object” that it was being caused inside an ASP.NET asmx web service being called from a ComponentArt grid control.  The web service was causing an exception but it was not caught by Application_Error!

I spent a few hours trying to find out where on the client the exception was occurring before tracking it to the web service.  I figured nothing was happening on the server since Application_Error didn’t log the error for me.

So, unless you know something I don’t know, make sure you add your own error handling to your Web Services.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>