Free Support Forum -

Connection with the server was reset error by IE explorer while opening large file using Aspose.Cells for .NET in C#

Is there any reason why on larger files (not that large, 1700 records) that IE gets the following error “the connection with the server was reset” when opening in excel?


Never find such a problem. Could you please save the file on disk and see the size of the file?

im thinking its not related to the excel doc. It works fine under Firefox.

Any ideas on settings under IE 6 that could cause this? This is a SSL site.


Maybe it can do some help for you.

If I change the IE Settings Under

Tools - Internet Options - Privacy

to Low or Accept All Cookies then when using OpenInExcel it works but if I use Medium or higher the “connection with the server was reset” error occurs.

I am using IE 6 on Windows 2003 with all the latest patches.

I’m also getting weird behavior on Firefox now. When downloading the excel file it gets stucks and you have to cancel the download.

Any ideas?

Not sure about this problem.

That may be a problem in security setting. You can ask your users to add your site in trust sites and assign enough rights.

The problem isnt just IE anymore. Firefox doesnt finish downloading the file.

If I save the excel to web server then provide link for user it works fine. The problems only occur when we use OpenInExcel.

Also adding web site to trusted site doesnt make a difference.

In OpenInExcel option, Aspose.Excel writes file as binary data to client. I think you may have to change the time-out value in the web server.

How about without https?

The timeout is set for 2 minutes (default for iis 6).

The error occurs around 4-5 seconds. I will setup a non https test page on the same server and let you know how it goes.

"If I change the IE Settings Under

Tools - Internet Options - Privacy

to Low or Accept All Cookies then when using OpenInExcel it works"

You can try to set your web application’s url in trusted site and set the privacy to low, then see what happens.

I’m really trying to get it to work on default settings in IE and Firefox because we have hundreds of users and don’t want to maintain browser settings. Its just a maintenance headache.

Does the following code cause the same problem?

FileStream fs1 = new FileStream(“d:\book1.xls”, FileMode.Open, FileAccess.Read);
byte[] data1 = new byte[fs1.Length];
fs1.Read(data1, 0, data1.Length);

this.Response.ContentType = “application/xls”;
Response.AddHeader( “content-disposition”,“inline; filename=book1.xls”);

I think maybe https has some restricts on binary data streaming. In our machines, we always use default settings in IE. And most of other users have no difficulties with default settings in IE.

So in your case, the best way may be generating the file on disk and providing your users a link.