Click here to Skip to main content
15,904,339 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
JavaScript
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> 
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.
Posted

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900