[
  {
    "Id": "1108266",
    "ThreadId": "462456",
    "Html": "Hi,<br />\n<br />\nI have a zipped file on my server (created with this framework).<br />\nI have a windows mobile device.<br />\nI want to point to a url that will load that zip file on the server and retrun it as a stream.<br />\nThen I want to load that stream directly into a zipfile without writing to a disk.<br />\n<br />\nI copied this from the sample code provided:<br />\n<pre><code>using (ZipFile zip = new ZipFile(_path))\n{\nzip.Save(Response.OutputStream);\n}\n</code></pre>\n\nOn my client side I have this:<br />\n<pre><code>HttpWebRequest request = (HttpWebRequest)WebRequest.Create(&quot;my url&quot;);\nrequest.Method = &quot;GET&quot;;\nrequest.Timeout = 5000; // 5 seconds in milliseconds     \nrequest.ReadWriteTimeout = 20000; // allow up to 20 seconds\nbyte[] buffer;\nint nBlockLength = 1024;\nint nBytesRead = 0;\nMemoryStream ms = new MemoryStream();\nusing (Stream response = ((HttpWebResponse)request.GetResponse()).GetResponseStream())\n{\ndo\n{\n    buffer = new byte[nBlockLength];\n    nBytesRead = response.Read(buffer, 0, nBlockLength);\n    ms.Write(buffer, 0, nBytesRead);\n    } \nwhile (nBytesRead &gt; 0);\n}\nZipFile = Ionic.Zip.ZipFile.Read(ms);\n</code></pre>\n\nBut on the last line it tells me of an error that it does not recignise this as a zip file.<br />\n<br />\nWhat am i doing wrong pls?<br />\n<br />\nThanks<br />\n",
    "PostedDate": "2013-10-16T06:02:35.647-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]