title: Server-side ASP.Net Ajax exception handling
body: <p>I am using ASP.net's AJAX framework and I am trying to do some exception logging on the javascript-called webservice.</p>
  
  <p>Looking through the web, I find <a href="http://dotnetslackers.com/columns/ajax/AspNetAjaxExceptionLogging.aspx" rel="noreferrer">some people</a> handling them client-side and sending them back to the server. I'd prefer not doing that since it relies on an other server call (if it failed the first time, sending an other request doesn't look like a good idea and that makes me change all my calls)</p>
  
  <p>I see some other people <a href="http://www.eggheadcafe.com/tutorials/aspnet/af62d138-fa2f-491e-901f-d36a82f107e8/net-web-services--excep.aspx" rel="noreferrer">decorating all their methods</a> with try... catch blocks (which leads to duplicate error handling, and yet an other try catch block).</p>
  
  <p>However, I'm trying to achieve something similar to global.asax's <code>Application_Error()</code> which handles every uncaught exception (nope, it doesn't seem to be called for AJAX called methods exceptions). </p>
  
  <p>Is that even possible?</p>