I use an updatepanel and I register a handler for endRequest to catch errors:
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
On the server an exception is thrown to test the client side. The problem is that in IE and FireFox EndRequestHandler is never called! It works as expected in Opera and Safari.
On a simple page with few controls it works as expected in all browsers. What I found out with Firebug is that the response is Content-length: 67, but there is no response (empty tab for response)! The expected response is
53|error|500|Object reference not set to an instance of an object.|
for example.
I have not debugged the ajax library precisely but what I have seen is that some code runs to prepare for pageLoading event (maybe because it cannot detect the error?), but there is no information for updatepanels from the response and an error occurs trying to use an object for updatepanels which is null. The error is caught by a try-finally block.
So, there may be something on the server (in the asp.net page) that causes the problem, but I couldn't find it. Could someone help me?