Solving development problems  |  About this blog

Archive for the ‘ajax error’ tag

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>

Written by Avivo

June 16th, 2009 at 7:48 pm