Zip to memorystream

0 votes
asked Feb 15, 2012 by prdbrat (120 points)
edited Feb 16, 2012

I have written exact code on my web page as referenced here: however I get an error at the line: ms.WriteTo(Response.OutputStream); The error is "Cannot access a closed stream." I want to output a zip file without having to save the zip to a file system.

Applies to: Rebex ZIP

1 Answer

0 votes
answered Feb 16, 2012 by Lukas Matyska (59,490 points)

Can you please post here the code you are trying to execute? Please include whole method to see the context.

Please note the underlying stream is closed when the ZipArchive is closed. To override this functionality please use the ArchiveStreamCloseMode.LeaveOpen argument in the constructor.