{
  "WorkItem": {
    "AffectedComponent": {
      "Name": "",
      "DisplayName": ""
    },
    "ClosedComment": "this is due to a bug in user code. ",
    "ClosedDate": "2011-07-26T16:02:32.377-07:00",
    "CommentCount": 0,
    "Custom": null,
    "Description": "Hello:\nI am using the basic functionality of dotnetzip based on the examples they have given for my C# ASP.NET application.\n \nI, and the other developers, are able to successfully create, download, etc. .zip files when debugging locally on the computer.\n \nHowever, when the app is pushed to the testing server, things change.\n \nThe .zip file appears to be created (based on the name and .zip extension), but will not open.  We get errors stating that the .zip file is invalid.\n \nBased on another forum, I removed the \"Response.BufferOutput = false\" command, but then no .zip file was returned at all.\n \nI've asked the administrator and he assures me there are no other server issues and other things download just fine via a web browser.\n \nMight this have to do with buffering?  How we are sending the file down via the application?\n \nHere is my sample code that works locally, but not on the server:\n \n                // set up new memory stream\n                MemoryStream streamHtml = new MemoryStream();\n                pdf.Save(streamHtml);  // pdf object instantiated above\n \n                // reset pointer\n                streamHtml.Seek(0, SeekOrigin.Begin);\n \n                Response.Clear();\n                Response.BufferOutput = false;  // for large files\n                string filename = DateTime.Now.ToString(\"yyyyMMddHHmm\") + \"_CCD.zip\";\n                Response.ContentType = \"application/zip\";\n                Response.AddHeader(\"content-disposition\", \"filename=\" + filename);\n \n                // set up zip file\n                using (ZipFile zip = new ZipFile())\n                {\n                    // add ccd xml to file\n                    zip.AddEntry(\"CCD.pdf\", streamHtml);\n \n                    // add html just in case\n                    zip.AddEntry(\"CCD.html\", ccdHtml);\n \n                    // save file\n                    zip.Save(Response.OutputStream);\n                }\n \n                Response.Close();",
    "LastUpdatedDate": "2013-05-16T05:31:40.637-07:00",
    "PlannedForRelease": "",
    "ReleaseVisibleToPublic": false,
    "Priority": {
      "Name": "Low",
      "Severity": 50,
      "Id": 1
    },
    "ProjectName": "DotNetZip",
    "ReportedDate": "2010-11-24T07:17:33.013-08:00",
    "Status": {
      "Name": "Closed",
      "Id": 4
    },
    "ReasonClosed": {
      "Name": "Unassigned"
    },
    "Summary": "Invalid .Zip File When Downloading From Server",
    "Type": {
      "Name": "Issue",
      "Id": 3
    },
    "VoteCount": 2,
    "Id": 12564
  },
  "FileAttachments": [],
  "Comments": [
    {
      "Message": "Hi,\r\n\r\nI think the problem is Response.Close. Using HttpApplication.CompleteRequest instead might fix your problem.\r\n\r\nSee my comment at http://dotnetzip.codeplex.com/Thread/View.aspx?ThreadId=238541 for more information...\r\n\r\nHopefully that works, because I've suggested the same fix for a couple of other similar problems here today :-).\r\n\r\nCheers,\r\n\r\nMike",
      "PostedDate": "2010-12-16T07:32:12.737-08:00",
      "Id": -2147483648
    },
    {
      "Message": "I had this same problem.  Make sure all the files exist before adding them.  If any file doesn't exist it will cause this error.",
      "PostedDate": "2010-12-29T13:16:46.637-08:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2011-07-26T16:02:32.377-07:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2013-02-21T18:43:21.077-08:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2013-05-16T05:31:40.637-07:00",
      "Id": -2147483648
    }
  ]
}