[
  {
    "Id": "521281",
    "ThreadId": "234514",
    "Html": "\r\n<p><span style=\"font-family:Consolas\"><span style=\"font-family:Consolas\"><span style=\"font-family:Consolas\"></p>\r\n<div style=\"color:black; background-color:white\">\r\n<pre><div style=\"color:black; background-color:white\"><pre>Response.Clear();\r\nResponse.ClearContent();\r\nResponse.ClearHeaders();\r\nResponse.BufferOutput= <span style=\"color:blue\">false</span>;\r\nResponse.ContentType = <span style=\"color:#a31515\">&quot;application/zip&quot;</span>;\r\n<span style=\"color:green\">//Response.ContentType = &quot;application/octet-stream&quot;;                </span>\r\nResponse.AddHeader(<span style=\"color:#a31515\">&quot;content-disposition&quot;</span>, <span style=\"color:#a31515\">&quot;filename=&quot;</span> &#43; archiveName);\r\n<span style=\"color:blue\">using</span> (ZipFile zip = <span style=\"color:blue\">new</span> ZipFile())\r\n{\r\n\t<span style=\"color:blue\">foreach</span> (<span style=\"color:blue\">var</span> f <span style=\"color:blue\">in</span> filesToInclude)\r\n        {\r\n                  zip.AddFile(f,<span style=\"color:#a31515\">&quot;files&quot;</span>);\r\n        }\r\n        zip.AddEntry(<span style=\"color:#a31515\">&quot;Readme.txt&quot;</span>, ReadmeText);\r\n        zip.Save(Response.OutputStream);\r\n}\r\nResponse.End();\r\n</pre>\r\n</div>\r\n</pre>\r\n</div>\r\n</span></span></span>\r\n<p></p>\r\n<p>&nbsp;<span style=\"font-family:Consolas\"><span style=\"font-family:Consolas\"><span style=\"font-family:Consolas\"><span style=\"font-family:Consolas\"><span style=\"font-family:Consolas\"><span style=\"font-family:Consolas\">I am using above code to zip the file\r\n 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\r\n creating a zip file of the zip file with the same name.&nbsp;Have&nbsp;any idea where i am wrong in this code?</span></span></span></span></span></span></p>\r\n<p><span style=\"font-family:Consolas\"><span style=\"font-family:Consolas\"><span style=\"font-family:Consolas\"><span style=\"font-family:Consolas\"><span style=\"font-family:Consolas\"><span style=\"font-family:Consolas\">&nbsp;</span></span></span></span></span></span></p>\r\n",
    "PostedDate": "2010-11-12T13:02:58.247-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "521301",
    "ThreadId": "234514",
    "Html": "\r\n<p>I tried with Response.ContentType = &quot;application/octet-stream&quot;;&nbsp; and it is working now for me. I dont know what is happening at IIS.</p>\r\n",
    "PostedDate": "2010-11-12T13:38:48.407-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]