We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

thread was being aborted error - on save

Thread ID:

Created:

Updated:

Platform:

Replies:

148701 Oct 30,2019 07:04 PM UTC Oct 31,2019 02:07 PM UTC ASP.NET Web Forms 1
loading
Tags: XlsIO
Bert Sirkin
Asked On October 30, 2019 07:04 PM UTC

I'm executing the following code once I've created a workbook using XLSIO:

Workbook.SaveAs(sFileName, ExcelSaveType.SaveAsXLS, response, ExcelDownloadType.Open)

where sFileName is the complete path and filename.

This line of code always creates a "thread was being aborted" error. And, when the dialog to open the file appears, the filename is the webpage filename (e.g., mypage.aspx) instead of the filename being supplied.

1. Is there any way to avoid the "thread was being aborted" error?
2. How can I get the OS to use the actual filename that I'm supplying (xxx.xlsx), rather than the webpage name (mypage.aspx) when opening or saving?



Abirami Varadharajan [Syncfusion]
Replied On October 31, 2019 02:07 PM UTC

Hi Bert, 

We have invoked Response.End() method inside the Workbook.SaveAs() method to download the Excel file, so the exception occurs sometimes. As this is the known issue in ASP.NET, we have prepared sample to overcome this issue. The sample can be downloaded from following link. 
 
 
Please refer to below KB article to overcome this issue at your end. 
 
 
References: 
 
Kindly try and let us know if this helps. 
 
Regards, 
Abirami 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon