运用Ajax制作的网站在Web服务为启动的情况下,出现“The status code returned from the server was: 12031"的错误,请问该如何避免出现这种错误?该怎么解决这种错误?

解决方案 »

  1.   

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

  2.   

    [转载]daqiaonanlu2000的专栏
    使用微軟的UpdatePanel,當UpdatePanel包的太大,出現下列錯誤訊息
    Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 12031
    微軟的KB是這樣寫的12031 ERROR_INTERNET_CONNECTION_RESET
    The connection with the server has been reset.http://support.microsoft.com/kb/193625也有人提到,是因為request的buffer不足,所造成的!
    所以建議調整,Web.Config檔<httpRuntime maxRequestLength="8192"/>
    但是對我的情況來說,都沒有解決問題~~後我我姑且這樣做~~
    在@ Page 指示詞中加入enableeventvalidation="false"
    這樣就OK了~~