This project is read-only. Zip inside Zip Issue

Nov 12, 2010 at 9:02 PM

Response.BufferOutput= false;
Response.ContentType = "application/zip";
//Response.ContentType = "application/octet-stream";                
Response.AddHeader("content-disposition", "filename=" + archiveName);
using (ZipFile zip = new ZipFile())
	foreach (var f in filesToInclude)
        zip.AddEntry("Readme.txt", ReadmeText);

 I am using above code to zip the file and download the file. The code works fine on localhost. But if i install on server then the downloaded zip file is zipped twice. Default Windows compression Extract All not work and even with Winzip it is not working. From WinRar i came to know that it is creating a zip file of the zip file with the same name. Have any idea where i am wrong in this code?


Nov 12, 2010 at 9:38 PM

I tried with Response.ContentType = "application/octet-stream";  and it is working now for me. I dont know what is happening at IIS.