Hello friends,
Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 12031
I am getting this error when i am saving to database. If I understood you correctly, it is an UpdatePanel problem in your page, here is the solution set EnablePartialRendering to false in the ScriptManager
I think it may help somebody Please first check your Asp.Net Ajax Extension and Ajax ControlToolkit (if been used) ' s version. Update to the latest.If not, you should check your settings such as web.config and your C# code.
By the way , based on the error description, it looks mostly like some setting errors.
12031 ERROR_INTERNET_CONNECTION_RESET
The connection with the server has been reset.
If your problem cannot been resolved , please share more code. If you're getting that from an updatePanel, set EnablePartialRendering="false" in the ScriptManager for the page, and then it should give you the actual error.
Also, if it only happens occasionally, I've found that it could be a viewstate problem, especially when the page goes a long time (20mins or so) between refreshes.
Otherwise, try some try/catch blocks. Those are some easy methods.
Hope that helps!
Thanks I have seen this error occur when a button is clicked from within an UpdatePanel and the session has timed out. You can trap this error by adding a javascript error handler.
JavaScript
// catch timeout error Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler); function EndRequestHandler(sender, args) { if (args.get_error() != undefined ) { var errorMessage; var error = args.get_error; if (args.get_response().get_statusCode() == ' 12031' ) { // ERROR_INTERNET_CONNECTION_RESET errorMessage = " Session Timeout." ; else if (args.get_response().get_statusCode() == ' 200' ) { errorMessage = args.get_error().message; else { errorMessage = ' An unspecified error occurred. ' ; args.set_errorHandled( true ); alert( " An error occurred: " + errorMessage + " Please refresh the page to restart your session." ); // window.location.reload(); //refresh to re-login Hope it helps!!
Thanks
  • Read the question carefully.
  • Understand that English isn't everyone's first language so be lenient of bad spelling and grammar.
  • If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome.
  • Don't tell someone to read the manual. Chances are they have and don't get it. Provide an answer or move on to the next question. Let's work to help developers, not make them feel stupid.
  •