Click here to Skip to main content
12,076,727 members (44,290 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C#3.0 C#
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.
Posted 25-Jul-11 23:01pm
Comments
Alison P 26-Jul-11 4:32am
   
Hi, you haven't really asked a question here or given any context, I don't think anyone can help you much until you do. Best Regards, Ali
SAKryukov 26-Jul-11 11:49am
   
Agree. Not enough information.
--SA
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 3

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
  Permalink  
v2
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 4

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.
  Permalink  
v2
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 5

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
  Permalink  
v2
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 6

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.

//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
  Permalink  
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web04 | 2.8.160212.1 | Last Updated 7 Jun 2013
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100