Solving development problems  |  About this blog

Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 0

If you get an error:

Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 0

just add this code in HEAD section of your page/masterpage:

<script language="javascript" type="text/javascript">
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(endRequest);
function endRequest(sender, args)
{
	// Check to see if there's an error on this request.
	if (args.get_error() != undefined)
	{
	  //$get('Error').style.visibility = "visible";
	  // Let the framework know that the error is handled,
	  // so it doesn't throw the JavaScript alert.
	  args.set_errorHandled(true);
	}
}
</script>
  • Bellamy

    Excellent little script, thanks for publishing. Fixed my problem.

  • Rohit

    Where to call .. Please answer asap. I am facing this prob.
    I am using ajax. At local project is working fine but on live it is giving error

    Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 0

  • http://www.studiobikini.com/ admin

    We have modified this post…
    Just add it in HEAD section of your page / it is called automatically.

blog comments powered by Disqus