使用Ajax更新面板解析错误和超时问题. [英] Parsing error with Ajax update panel and time out issues.

查看:53
本文介绍了使用Ajax更新面板解析错误和超时问题.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

单击按钮,我试图在excel工作表中下载大量数据.此按钮位于Ajax:更新面板中.现在发生的是,当我尝试下载保存在更新进度中的进度图像时,它会出现并停留很长时间.过了一段时间,我得到了这两个错误:
1. Sys.WebForms.PageRequestManagerTimeoutException:服务器请求超时

2.Sys.WebForms.PageRequestManagerServerErrorException:在服务器上处理请求时发生未知错误.服务器返回的状态码为:0

我确实了解到此错误是由于异步回发超时而导致的,我将其保持在大约600.但是,如果数据更繁重且需要更多时间,该怎么办.此外,我在3.5框架中创建了该网站,现在由于将其转换为2.0框架,因此我也更改了一些下载机制的代码.甚至我添加了

Hi All,

I am trying to download a huge amount of data in excel sheet on a button click. This button is inside Ajax: update panel. Now what happens is that when i try to download the progress image kept inside update progress appears and stays there for a long time. After sometime than I get these two errors :
1. Sys.WebForms.PageRequestManagerTimeoutException: The server request timed out

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

I do understand that this error comes because of asynchronous post back time outs and i kept it approx 600. But what If data is more heavy and takes more time. Moreover I created this website in 3.5 framework and now i have shifted it to 2.0 framework due to which I changed some coding too for downloading mechanism. Even I added

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> 

在我的主页上仍然没有帮助我.
在3.5中,一切都像魅力一样,没有问题.要导出到excel,我正在使用EPPlus库.因此,我在这里向大家简要介绍了我的问题.

on my master page which still didn''t helped me at all.
In 3.5 everything works like charm, No issues are there. To export to excel I am making use of EPPlus library. So here all I have briefed you all about my problem. Kindly help me please.

推荐答案

get('Error').style.visibility ="visible"; // 让框架知道该错误已得到处理, // ,因此它不会引发JavaScript警报. args.set_errorHandled( true ); } } </script>
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>

在我的主页上仍然没有帮助我.
在3.5中,一切都像魅力一样,没有问题.为了导出到excel,我正在使用EPPlus库.因此,我在这里向大家简要介绍了我的问题.请帮助我.

on my master page which still didn''t helped me at all.
In 3.5 everything works like charm, No issues are there. To export to excel I am making use of EPPlus library. So here all I have briefed you all about my problem. Kindly help me please.


这篇关于使用Ajax更新面板解析错误和超时问题.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆