Timeout saving to the response stream

We are developing a website that is using the excel component to generate an Excel spreadsheet and write to the response stream using the save method. Our main client is having problems with this, often having to wait several minutes to get the spreadsheet. Every other attempt outside of their network retreives the spreadsheet in less than two seconds.

It appears that the problem is due to the proxy they are using, a Bluecoat appliance. Bluecoat tech support says that we need to send a chunked transfer terminator to tell the proxy that the stream is done. Do you have any idea on how we can do this or do you have a suggestion for a different method of sending the spreadsheet?

Thank You

Ken Ponder

Dear Ken,

The following is sample code that we write data to client browser:

this.Response.ContentType = "application/xls";
Response.AddHeader( "content-disposition","inline; filename=book1.xls");
Response.BinaryWrite(data1);
Response.End();

You can use Save method to write data to a MemoryStream and then you can try to use your own method to sending the spreadsheet.

Another method is to save the file on your server's local disk. Then you provide a hyperlink for downloading.

Another method is to save the file on your server’s local disk. Then you provide a hyperlink for downloading.

I’d like to go such way.
How to do this? Can I save file to server’s local disk silently without a dialog?

Hi,

Well, you may use Server.MapPath to save the generated excel file to disk using Workbook.Save() overloaded method.

Thank you.

public void Save(System.IO.Stream stream, Aspose.Excel.FileFormatType fileFormatType);

Did you mean this one?

Hi,

Save(System.IO.Stream stream, Aspose.Excel.FileFormatType fileFormatType);

you may use the above method if you want to save the file to stream another method that you may use:

MemoryStream ms = workbook.SaveToStream();



You can use the below method to save the file to disk on the server:
Save(string filename, Aspose.Excel.FileFormatType fileFormatType);


Thank you.

Thanks! Works fine.