{
  "WorkItem": {
    "AffectedComponent": {
      "Name": "",
      "DisplayName": ""
    },
    "ClosedComment": "fixed in changeset 31438.  First available in binary release v1.7.2.18, or v1.8.3.1.",
    "ClosedDate": "2009-05-08T07:46:04.523-07:00",
    "CommentCount": 0,
    "Custom": null,
    "Description": "using ZipFile.AddFileFromStream() with a stream obtained from WCF response (MessageBodyStream), throws a NotSupportedException. \n \nIt shouldn't.\n \nat System.ServiceModel.Dispatcher.StreamFormatter.MessageBodyStream.get_Length()\n   at Ionic.Zip.ZipEntry.FigureCompressionMethodForWriting(Int32 cycle)\n   at Ionic.Zip.ZipEntry.WriteHeader(Stream s, Int32 cycle)\n   at Ionic.Zip.ZipEntry.Write(Stream outstream)\n   at Ionic.Zip.ZipFile.Save()\n   at Ionic.Zip.ZipFile.Save(Stream outputStream)",
    "LastUpdatedDate": "2013-05-16T05:32:24.987-07:00",
    "PlannedForRelease": "",
    "ReleaseVisibleToPublic": false,
    "Priority": {
      "Name": "Low",
      "Severity": 50,
      "Id": 1
    },
    "ProjectName": "DotNetZip",
    "ReportedDate": "2009-05-08T07:05:51.13-07:00",
    "Status": {
      "Name": "Closed",
      "Id": 4
    },
    "ReasonClosed": {
      "Name": "Unassigned"
    },
    "Summary": "NotSupportedException when using WCF Stream as input",
    "Type": {
      "Name": "Issue",
      "Id": 3
    },
    "VoteCount": 1,
    "Id": 7742
  },
  "FileAttachments": [],
  "Comments": [
    {
      "Message": "I've resolved the issue (except for the Threading exception which I'll look into now, although the program works property even when it occurs).  I resolved it by using a byte[] object rather than a Stream object.  The key was learning the Length property of the Stream object was important.  The answer to this forum post lead me to the understanding that  Stream object wasn't going to work:\r\nhttp://social.msdn.microsoft.com/Forums/en-US/wcf/thread/95d888f6-273c-42f6-8a45-d0adfeb4dc4f\r\n\r\nInstead, I've changed my web service method to the following:        \r\n        public byte[] GetFileByteArray(string filepath)\r\n        {\r\n            byte[] buffer = null;\r\n            FileStream fs = File.OpenRead(filepath);\r\n            buffer = new byte[Convert.ToInt32(fs.Length)];\r\n            fs.Read(buffer, 0, (int)fs.Length);\r\n            return buffer;\r\n        }\r\n\r\nAnd I'm now using the following line of code in my website for loop:\r\nStream stream = new MemoryStream(SessionValues.mgsOps.GetFileByteArray(filepath));\r\n\r\nThanks again for all of your help, Cheeso.  Absolutely exceptional support for your product. :)",
      "PostedDate": "2009-05-08T07:21:56.39-07:00",
      "Id": -2147483648
    },
    {
      "Message": "Glad you found another way.  I fixed it anyway, in DotNetZip.  \r\n",
      "PostedDate": "2009-05-08T07:45:31.71-07:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2009-05-08T07:46:04.523-07:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2013-02-21T18:44:21.463-08:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2013-05-16T05:32:24.987-07:00",
      "Id": -2147483648
    }
  ]
}