Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server."

I have couple of update panels and jquery tabs on page. And also I am loading couple user controls on update panels. After user waited for couple of minutes (not checked the time approx 40 mins). when user send request from submit button it is giving below error?

'Sys.WebForms.PageRequestManagerServerErrorException: Sys.WebForms.PageRequestManagerServerErrorException: An unknown  error occurred while processing the request on the server. The status  code returned from the server was: 0' when calling method:  [nsIDOMEventListener::handleEvent] 

I am not able trace this issue to fix. But I am sure. This is causing by Ajax. Gurus, if you knows solution. Please let me know.

like image 993
James123 Avatar asked Oct 24 '11 20:10

James123


2 Answers

This issue sometimes occurs when you have a control registered as an AsyncPostbackTrigger in multiple update panels.

If that's not the problem, try adding the following right after the script manager declaration, which I found in this post by manowar83, which copies and slightly modifies this post by larryw:

<script type="text/javascript" language="javascript">     Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);     function EndRequestHandler(sender, args){         if (args.get_error() != undefined){             args.set_errorHandled(true);         }     } </script> 

There are a few more solutions discussed here: http://forums.asp.net/t/1066976.aspx/9/10

like image 193
James Johnson Avatar answered Oct 05 '22 13:10

James Johnson


I had this issue and I spent hours trying to fix it.

The solution ticked as answered will not fix the error only handle it.

The best approach is to check the IIS log files and the error should be there. It appears that the update panel encapsulates the real error and outputs it as a 'javascript error'.

For instance my error was that I forgot to make a class [Serializable]. Although this worked fine locally it did not work when deployed on the server.

like image 45
Scriptworks Avatar answered Oct 05 '22 14:10

Scriptworks