HttpZip and Aspose.Excel

Our web host installed HttpZip software on our site which caused a problem with our Excel downloads. I was unable to open any downloaded Excel files from my local drive. The error message is:

Microsoft Excel error “XXXXX.xls cannot be accessed. The file may be read-only, or you may be trying to access a read-only location. Or, the server the document is stored on may not be responding”.

Disabling the HttpZip from the site resolved the problem. Is Aspose.Excel incompatible with HttpZip software?

Thanks,
Al

Hi Al,

I think it’s the limitation of HttpZip software. Aspose.Excel use HttpResponse to directly send result data to client. It’s a standard and dynamic way. I don’t know much about HttpZip software. Could it zip the dynamic contents of an aspx page?

Hi Laurence,

Their website explains what it does:
Web Application Security & Performance Tools for Microsoft IIS Servers | Port80 Software

Thanks,
Al

Hi Laurence,

Any ideas yet on what causes the incompatibility with HttpZip?

Hi Laurence,

Any ideas yet on what causes the incompatibility ?

Hi Al,

I still have no ideas about this issue. But you can download the latest hotfix and have a try.



If it still is incompatible with HttpZip, you can try use Excel.Save(string,FileFormatType,out MemoryStream) method or Excel.Save(string,FileFormatType) to save result file to memory or disk. Then you can use your own code to send it to client.

Hi

Maybe I can help

Try to use the following code before streaming of Excel file.


With Response
.Clear
.ClearHeaders
.ClearContent
.Cache.SetExpires(Now.AddDays(-1))
.AddHeader(“pragma”,“no-cache” )
.ContentType = “application/vnd.ms-excel”
.AddHeader(“Content-disposition”, “inline; filename=test.xls”)
End With
’— Here insert Aspose Code for streaming Excel File

’—
Response.Flush