0 votes
by (120 points)
edited

I have written exact code on my web page as referenced here: http://forum.rebex.net/questions/521/how-to-dynamically-create-a-zip-archive-in-asp-net-without-temp-file-on-disk 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
by (70.2k 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.

...