{
  "WorkItem": {
    "AffectedComponent": {
      "Name": "",
      "DisplayName": ""
    },
    "ClosedComment": "fixed in changeset 31222.  This is first available in v1.8.2.9.  The fix is also backported to v1.7 - you need v1.7.2.14.",
    "ClosedDate": "2009-04-30T12:18:43.45-07:00",
    "CommentCount": 0,
    "Custom": null,
    "Description": "I isolated the problem in the code below. If I zip it with a password it throws an exception, without it works just fine. I don't know what I can do to solve this.\n \nI first thought that it was the fact that I am using streams but it seems that the problme occurs with normal files too. \n \n \n \n            HttpContext.Current.Response.Clear()\n            HttpContext.Current.Response.ClearHeaders()\n \n            If zipIt Then\n \n \n                HttpContext.Current.Response.ContentType = \"application/zip\"\n                HttpContext.Current.Response.AddHeader(\"content-disposition\", \"attachment; filename=\" & filename & \"_\" & DateTime.Now.ToString(\"yyyyMMddHHmmss\") & \".zip\")\n                'HttpContext.Current.Response.Buffer = True\n                'HttpContext.Current.Response.BufferOutput = True\n \n \n                Using zip As New ZipFile()\n \n                    If Not String.IsNullOrEmpty(zipPassword) Then\n                        zip.Password = zipPassword\n                        'zip.\n                    End If\n \n                    Dim stream As New MemoryStream\n                    wb.Save(stream, FileFormatType.Excel2003)\n                    zip.AddFile(\"c:\\temp\\test.txt\")\n                    'zip.AddFileStream(filename & \"_\" & DateTime.Now.ToString(\"yyyyMMddHHmmss\") & \".xls\", \"\", stream)\n                    zip.Save(HttpContext.Current.Response.OutputStream)\n \n                End Using\n \n \nServer Error in '/deSingel/trunk/deSingel Website/deSingel.Website' Application.\n________________________________________\nSpecified argument was out of the range of valid values.\nParameter name: offset \nDescription: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. \n \nException Details: System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.\nParameter name: offset\n \nSource Error: \n \nLine 348:                    zip.AddFile(\"c:\\temp\\test.txt\")\nLine 349:                    'zip.AddFileStream(filename & \"_\" & DateTime.Now.ToString(\"yyyyMMddHHmmss\") & \".xls\", \"\", stream)\nLine 350:                    zip.Save(HttpContext.Current.Response.OutputStream)\nLine 351:\nLine 352:                End Using\n \nSource File: r:\\TF_Localcache\\deSingel\\trunk\\deSingel Website\\DeSingelPresentationTier\\Exporter\\ExporterWebPart.vb    Line: 350 \n \nStack Trace: \n \n[ArgumentOutOfRangeException: Specified argument was out of the range of valid values.\nParameter name: offset]\n   System.Web.HttpResponseStream.Write(Byte[] buffer, Int32 offset, Int32 count) +11258230\n   Ionic.Zip.CountingStream.Write(Byte[] buffer, Int32 offset, Int32 count) +110\n   Ionic.Zip.CountingStream.Write(Byte[] buffer, Int32 offset, Int32 count) +110\n   Ionic.Zip.ZipCipherStream.Write(Byte[] buffer, Int32 offset, Int32 count) +617\n   Ionic.Zlib.ZlibBaseStream.Write(Byte[] buffer, Int32 offset, Int32 length) +879\n   Ionic.Zlib.DeflateStream.Write(Byte[] buffer, Int32 offset, Int32 count) +110\n   Ionic.Zip.ZipEntry._WriteFileData(Stream s) +1405\n   Ionic.Zip.ZipEntry._EmitOne(Stream outstream) +68\n   Ionic.Zip.ZipEntry.Write(Stream outstream) +552\n   Ionic.Zip.ZipFile.Save() +790\n   Ionic.Zip.ZipFile.Save(Stream outputStream) +269\n   DeSingel.PresentationTier.ExporterWebPart.StreamExcelFile(String sql, String filename, Boolean zipIt, String zipPassword) in r:\\TF_Localcache\\deSingel\\trunk\\deSingel Website\\DeSingelPresentationTier\\Exporter\\ExporterWebPart.vb:350\n   DeSingel.PresentationTier.ExporterWebPart.DoExportExcel(Boolean blnIncludeColumnNames, String strFilenameCustom, Boolean blnZipTheFile, String strZipPassword) in r:\\TF_Localcache\\deSingel\\trunk\\deSingel Website\\DeSingelPresentationTier\\Exporter\\ExporterWebPart.vb:291\n   DeSingel.PresentationTier.ExporterWebPart.Page_Load(Object sender, EventArgs e) in r:\\TF_Localcache\\deSingel\\trunk\\deSingel Website\\DeSingelPresentationTier\\Exporter\\ExporterWebPart.vb:178\n   System.Web.UI.Control.OnLoad(EventArgs e) +132\n   System.Web.UI.Control.LoadRecursive() +66\n   System.Web.UI.Control.LoadRecursive() +191\n   System.Web.UI.Control.LoadRecursive() +191\n   System.Web.UI.Control.LoadRecursive() +191\n   System.Web.UI.Control.LoadRecursive() +191\n   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2428",
    "LastUpdatedDate": "2013-05-16T05:32:26.24-07:00",
    "PlannedForRelease": "1.8 DotNetZip",
    "ReleaseVisibleToPublic": true,
    "Priority": {
      "Name": "Low",
      "Severity": 50,
      "Id": 1
    },
    "ProjectName": "DotNetZip",
    "ReportedDate": "2009-04-27T02:30:31.12-07:00",
    "Status": {
      "Name": "Closed",
      "Id": 4
    },
    "ReasonClosed": {
      "Name": "Unassigned"
    },
    "Summary": "Password protecting a zip file created in ASP.NET throws an exception",
    "Type": {
      "Name": "Issue",
      "Id": 3
    },
    "VoteCount": 1,
    "Id": 7696
  },
  "FileAttachments": [],
  "Comments": [
    {
      "Message": "Is this a bug or am I using the library wrong??",
      "PostedDate": "2009-04-29T07:28:35.21-07:00",
      "Id": -2147483648
    },
    {
      "Message": "Sure looks like a bug.  Seems to be a duplicate of workitem 7674.  http://dotnetzip.codeplex.com/WorkItem/View.aspx?WorkItemId=7674",
      "PostedDate": "2009-04-29T13:29:13.197-07:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2009-04-30T09:11:51.387-07:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2009-04-30T12:18:43.45-07:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2013-02-21T18:44:23.173-08:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2013-05-16T05:32:26.24-07:00",
      "Id": -2147483648
    }
  ]
}