TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
sadashiv chavan
NA
3
10.5k
While downloading excel file in IE browser getting an error "The connection with server was reset"
Mar 19 2012 8:08 AM
Hello,
I am exporting the excel file by passing the datatable.
I am using Handler file in asp.net.
All browser it is working fine but only in IE getting an error.
"The connection withe the server was reset"
I am using the EEPlus libreary i.e :using OfficeOpenXml;
I have some code like:
context.Response.ClearContent();
context.Response.Buffer = true;
context.Response.Charset = "";
context.Response.ClearHeaders();
using (ExcelPackage excelPackage = new ExcelPackage())
{
ExcelWorksheet wsExportOrder = excelPackage.Workbook.Worksheets.Add("Export Orders");
//Load the dtExportOrders data table into the sheet.
wsExportOrder.Cells.LoadFromDataTable(dtExportOrders, true);
string fileName = @"Export Orders.xls";
//Write it back to the client
context.Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
context.Response.AddHeader("content-disposition", "attachment; filename=\"" + fileName + "\"");
context.Response.BinaryWrite(excelPackage.GetAsByteArray());
context.Response.Flush();
}
context.Response.End();
Reply
Answers (
1
)
Regarding Log_History table in asp.net application
C# VS Web application error, problem with Interface implementation usage