[
  {
    "Id": "126709",
    "ThreadId": "38210",
    "Html": "<br>\r\n<em>The following is the message from yenyit:<br>\r\n<br>\r\n</em>Hi. &nbsp;I'm doing some experiments with your DotNetZip component using an ASP.Net (2.x) page, and I'm getting an exception (Specified method is not supported) on the &quot;zip.Save();&quot; line. &nbsp;The following is the source code of the test page:<br>\r\n<br>\r\n&lt;%@ Page Language=&quot;C#&quot; Debug=&quot;true&quot; %&gt;<br>\r\n&lt;%@ Import Namespace=&quot;System.Text&quot; %&gt;<br>\r\n&lt;%@ Import Namespace=&quot;System.IO&quot; %&gt;<br>\r\n&lt;%@ Import Namespace=&quot;Ionic.Utils.Zip&quot; %&gt;<br>\r\n&lt;%@ Import Namespace=&quot;System.Collections.Generic&quot; %&gt;<br>\r\n&lt;script language=&quot;C#&quot; runat=&quot;server&quot;&gt;<br>\r\npublic void Page_Load (Object sender, EventArgs e)<br>\r\n{<br>\r\n&nbsp;Response.Clear();<br>\r\n&nbsp;String ReadmeText= &quot;This is a zip file dynamically generated at &quot; + System.DateTime.Now.ToString(&quot;G&quot;);<br>\r\n&nbsp;Response.ContentType = &quot;application/zip&quot;;<br>\r\n&nbsp;Response.AddHeader(&quot;content-disposition&quot;, &quot;filename=test.zip&quot;);<br>\r\n&nbsp;<br>\r\n&nbsp;using (ZipFile zip = new ZipFile(Response.OutputStream)) {<br>\r\n&nbsp;&nbsp;&nbsp;zip.AddFileFromString(&quot;Readme.txt&quot;, &quot;&quot;, ReadmeText);<br>\r\n&nbsp;&nbsp;&nbsp;zip.Save();<br>\r\n&nbsp;}<br>\r\n<br>\r\n&nbsp;Response.End();<br>\r\n}<br>\r\n&lt;/script&gt;<br>\r\n<br>\r\n<br>\r\nCould you please let me know what I've done wrong? &nbsp;Thanks.<br>\r\n",
    "PostedDate": "2008-10-21T16:55:06.867-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "126710",
    "ThreadId": "38210",
    "Html": "I suspect that the breaking line is&nbsp;the one that calls ZipFile.AddFileFromString() and not ZipFile.Save().&nbsp;&nbsp;&nbsp;<br>\r\n<br>\r\nThere was a breaking change in DotNetZip in v1.6.&nbsp;&nbsp; Originally the name of the method for adding content from a string was called &quot;AddStringAsFile&quot;. I shipped some early DLLs with that method in it.&nbsp;&nbsp;&nbsp;Later I thought this was misleading and non-intuitive.&nbsp; I changed the method name to AddFileFromString().&nbsp; <br>\r\n<br>\r\nIs it possible that you have an older DLL for DotNetZip in the ASP.NET bin directory?&nbsp;&nbsp; or in the GAC?<br>\r\n<br>\r\nIf your ASP.NET page is running against an older DLL, it would exhibit this problem. <br>\r\n<br>\r\n",
    "PostedDate": "2008-10-21T16:58:23.42-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "127032",
    "ThreadId": "38210",
    "Html": "Thanks for your reply.&nbsp; I am quite certain that the page is not using an older version of the DotNetZip DLL.&nbsp; If I change the &quot;zip.AddFileFromString&quot; line from the source code above to:<br>\r\n<br>\r\nzip.AddStringAsFile(&quot;Readme.txt&quot;, &quot;&quot;, ReadmeText);<br>\r\n<br>\r\nthen I'll get a compiler error :&nbsp;'Ionic.Utils.Zip.ZipFile' does not contain a definition for 'AddStringAsFile'<br>\r\n<br>\r\nAlso,&nbsp;if I change the &quot;zip.AddFileFromString&quot; line from the source code above to:<br>\r\n<br>\r\nzip.AddFile(&quot;c:\\\\inetpub\\\\testing\\\\www2\\\\test.txt&quot;);<br>\r\n<br>\r\nthen I'll get the&nbsp;&quot;Specified method is not supported&quot;&nbsp;exception&nbsp;on the &quot;zip.Save();&quot; line again as before.<br>\r\n",
    "PostedDate": "2008-10-22T13:50:30.34-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "127078",
    "ThreadId": "38210",
    "Html": "I am having the same issue with the 1.6 release. <br>\r\n<br>\r\nI just tried using the 1.5 dll and it works.<br>\r\n<br>\r\nFrom the debug output the error looks to be in a call to HttpResponseStream.get_Position()<br>\r\n",
    "PostedDate": "2008-10-22T17:44:06.73-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "127374",
    "ThreadId": "38210",
    "Html": "<p>Ah, thank you, that helps. </p>\r\n<p>Yes, this looks like a bug in the ZipFile.Save() method.&nbsp; I have reproduced it here.&nbsp;Sorry about that.&nbsp;&nbsp;&nbsp;My unit tests do not include an ASP.NET runtime test.<br>\r\n<br>\r\nLet me look into fixing it. </p>\r\n",
    "PostedDate": "2008-10-23T17:29:09.707-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "127382",
    "ThreadId": "38210",
    "Html": "This is fixed in&nbsp;change set 25482.&nbsp; I also updated the binaries on the v1.6 release tab.&nbsp; Thanks for reporting this.\r\n",
    "PostedDate": "2008-10-23T18:09:39.943-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "185957",
    "ThreadId": "38210",
    "Html": "I'm getting the same error with version 1.7.&nbsp; I'm using a WCF web service method <em>GetFileStream</em> which returns a Stream object because the machine the web service is on is a DMZ.&nbsp; Here is the code I'm using.&nbsp; It crashes on the bold line.<br>\r\n<br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Response.Clear();<br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Response.ContentType = &quot;application/zip&quot;;<br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Response.AddHeader(&quot;content-disposition&quot;, &quot;filename=Reports.zip&quot;);<br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; using (ZipFile zip = new ZipFile())<br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; foreach (string filepath in files_to_zip)<br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FileInfo file = new FileInfo(filepath);<br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Stream stream = mgsOps.GetFileStream(filepath);<br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; zip.AddFileStream(file.Name, &quot;&quot;, stream);<br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <strong>zip.Save(Response.OutputStream);</strong><br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Response.End();<br>\r\n<br>\r\nIt's worth noting that before I moved the web service to the DMZ machine and could access files directly from the network, the bold line above worked successfully although I was creating the zip file a little differently.<br>\r\n",
    "PostedDate": "2009-05-01T11:26:13.21-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "186581",
    "ThreadId": "38210",
    "Html": "Mike, do you get a stacktrace? <br>\r\ncan you post it? <br>\r\n",
    "PostedDate": "2009-05-04T08:56:21.267-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "186592",
    "ThreadId": "38210",
    "Html": "Hi Cheeso,<br>\r\n<br>\r\nThanks for the reply.&nbsp; Here is the stack trace:<br>\r\n<br>\r\n&quot;&nbsp;&nbsp; at System.ServiceModel.Dispatcher.StreamFormatter.MessageBodyStream.get_Length()\\r\\n&nbsp;&nbsp; at Ionic.Zip.ZipEntry.FigureCompressionMethodForWriting(Int32 cycle)\\r\\n&nbsp;&nbsp; at Ionic.Zip.ZipEntry.WriteHeader(Stream s, Int32 cycle)\\r\\n&nbsp;&nbsp; at Ionic.Zip.ZipEntry.Write(Stream outstream)\\r\\n&nbsp;&nbsp; at Ionic.Zip.ZipFile.Save()\\r\\n&nbsp;&nbsp; at Ionic.Zip.ZipFile.Save(Stream outputStream)\\r\\n&nbsp;&nbsp; at Reports.Download_click(Object sender, EventArgs e) in c:\\\\Inetpub\\\\wwwroot\\\\MGS2\\\\Reports.aspx.cs:line 300&quot;<br>\r\n",
    "PostedDate": "2009-05-04T09:24:26.07-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "187864",
    "ThreadId": "38210",
    "Html": "Is there a possibility that the problem is in the <em>zip.AddFileStream(file.Name, &quot;&quot;, stream)</em> line of code?&nbsp; Could it be incorrectly creating the zip file causing it to be corrupt or something and the <em>zip.Save(Response.OutuptStream)</em> line has a problem with it?<br>\r\n",
    "PostedDate": "2009-05-07T13:16:27.48-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "187874",
    "ThreadId": "38210",
    "Html": "<p>Hmmm, <br>Based on what I am seeing, the problem is that while trying to create the zip file and save it to Response.OutputStream,&nbsp; DotNetZip is getting an error while reading the Length property on the passed-in stream (which is, I guess, the result of the GetFileStream() ) call.&nbsp;</p>\r\n<p>I still cannot tell what the error is.&nbsp; Thanks for the stack trace; can you also provide the exact exception?&nbsp; It could be a null pointer exception, or a method not supported exception, etc.&nbsp; It's essential to know.</p>\r\n<p>Can you help me better understand what you are doing in the code?&nbsp; Here is my guess: In the context of an ASP.NET page, you are calling out to a remote web service using WCF.&nbsp;&nbsp;&nbsp;The response from WCF contains one or more attachments?&nbsp;&nbsp; And you are then using GetFileStream() to get the files associated to those attachments.&nbsp; <br><br>Are you certain that the stream in question returned from GetFileStream() is non-null?&nbsp; <br><br>I think your instinct that the problem might be with AddFileFromStream() is correct.&nbsp; IF there is a problem with the stream, it will fail during the call to Save(), which is when the ZipFile (or bytestream) is created.<br>If the stream you pass in to AddFileFromStream() is null, the exception will happen upon Save().&nbsp; <br>And if there are other problems with the Stream, for example if it does not support the Length property, it will also fail only upon Save().&nbsp;&nbsp;</p>\r\n<p style=\"color:Red\">Addendum: In v1.9, the ZipFile.AddFileFromString() method was renamed to ZipFile.AddEntry()</p>",
    "PostedDate": "2009-05-07T13:44:25.267-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "187882",
    "ThreadId": "38210",
    "Html": "Thanks for the response, Cheeso.&nbsp; Your continued support of your product is truly appreciated.<br>\r\n<br>\r\nIt is a System.NotSupportedException: &quot;Specified method is not supported.&quot;<br>\r\n<br>\r\nIt seems to get the stream successfully from the WCF service method.&nbsp; When I check the Stream object, it is not null although some of the properties have a exceptions eg. Length&nbsp;&nbsp; &nbsp;'stream.Length' threw an exception of type 'System.NotSupportedException'&nbsp;&nbsp; &nbsp;long {System.NotSupportedException}.&nbsp; When I check the Count property of the ZipFile object after I call the AddFileStream method, it does in fact increment.&nbsp; <br>\r\n<br>\r\nIt seems then that the issue is how I'm creating the Stream object.&nbsp; This is out of the scope of DotNetZip, but I'm wondering if you can tell me if there is anything wrong with the method I'm using:<br>\r\n<br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public Stream GetFileStream(string filepath)<br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return File.OpenRead(filepath);<br>\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>\r\n<br>\r\n",
    "PostedDate": "2009-05-07T14:02:43.92-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "187930",
    "ThreadId": "38210",
    "Html": "<p>Geez, I don't know what to tell you.&nbsp;</p>\r\n<p>I thought that GetFileStream() was a method on one of the WCF support classes, but your reply seems to indicate that GetFileStream() is something you wrote.&nbsp; And furthermore it is very simple.</p>\r\n<p>What do you mean &quot;it seems to get the stream successfully from the WCF service method&quot; ?&nbsp;&nbsp;&nbsp; I don't see where WCF is used at all. &nbsp; I think I still don't understand what you are doing.</p>\r\n<p>Are you using ASP.NET and WCF in the same app?&nbsp; Or are you saying that there are two separate apps, and in the first one, using WCF, you can successfully use DotNetZip, but in the second app, using ASP.NET, then you cannot successfully use DotNetZip. ????&nbsp;&nbsp; I am guessing here.</p>\r\n<p>If I were debugging this I would check, wthin GetFileStream(), that I can read the file and get the Length and so on.&nbsp; Try to separate it from any DotNetZip issues.&nbsp;</p>\r\n<p>I don't see anything wrong with your method.&nbsp; Could there be a permissions/security issue?&nbsp;&nbsp; Also, for a stream returned in that way, you need to be sure to Dispose() it when you finish using it.&nbsp;</p>\r\n<p>Taking one step back, I don't understand why you would use GetFileStream() and AddFileFromStream.&nbsp; If GetFileStream just opens the file, why not just call ZipFile.AddFile() passing the name of the file - it seems simpler.</p>\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>",
    "PostedDate": "2009-05-07T17:07:34.46-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "188103",
    "ThreadId": "38210",
    "Html": "<p>I have a WCF web service on one machine and a website that uses the WCF service on another machine.&nbsp; The WCF accomplishes all of the &quot;business&quot; processing and just passes results required to load the page back to the website (on another machine).&nbsp; I was originally using the following code - which works - to create the zip file:</p>\r\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Response.Clear();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Response.ContentType = &quot;application/zip&quot;;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Response.AddHeader(&quot;content-disposition&quot;, &quot;filename=Reports.zip&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; using (ZipFile zip = new ZipFile())<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; foreach (string filepath in files_to_zip)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FileInfo myFile = new FileInfo(filepath);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; zip.AddFile(myFile.FullName, &quot;&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; zip.Save(Response.OutputStream);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Response.End();</p>\r\n<p>This was in the testing/creation phase of the website, however.&nbsp; It is ultimately going to be moved to another machine which is in a DMZ and does not have access to the network location where the files that I need to zip are located.&nbsp; This is where the web service comes in.&nbsp; I'm now trying to use the web service to pass a <em>stream</em> of data from the file to be zipped rather than the <em>location </em>of the file to be zipped so the website doesn't need direct access to the file.&nbsp; This is why I'm trying now using AddFileStream() rather than AddFile().</p>\r\n<p>&nbsp;</p>\r\n<p>I've altered my GetFileStream() method on the web service to be the following to help debugging:</p>\r\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public Stream GetFileStream(string filepath)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Stream stream = File.OpenRead(filepath);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return stream;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p>\r\n<p>When I step through it&nbsp; in debug, stream.Length <span style=\"text-decoration:underline\">is</span> defined when I try a file.&nbsp; The value is of type long and has a value of 424448.&nbsp;</p>\r\n<p><img src=\"http://img19.imageshack.us/img19/4534/54756485.png\" alt=\"\"></p>\r\n<p>This is what I meant when I said &quot;it seems to get the stream successfully from the WCF service method&quot;.&nbsp; However, when I step further to see what the value of the Length property of the Stream object is on the website that I got back from the web service, there is an exception for the Length property.</p>\r\n<p><img src=\"http://img14.imageshack.us/img14/6644/22044085.png\" alt=\"\"></p>\r\n<p>As another test, I decided to move the GetFileStream() to my web site just to rule out the web service being the issue.&nbsp; To my amazement, when the Stream object was passed back from the GetFileStream() method, now on the same aspx page, to the zip for loop, it <span style=\"text-decoration:underline\">did</span> have a valid Length property value.&nbsp; As I continued to step through this time, the exception below occurred at the Response.End() line;</p>\r\n<p style=\"padding-left:30px\">{Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack.}&nbsp;&nbsp;&nbsp; System.Exception {System.Threading.ThreadAbortException}</p>\r\n<p style=\"padding-left:30px\">&quot;&nbsp;&nbsp; at System.Threading.Thread.AbortInternal()\\r\\n&nbsp;&nbsp; at System.Threading.Thread.Abort(Object stateInfo)\\r\\n&nbsp;&nbsp; at System.Web.HttpResponse.End()\\r\\n&nbsp;&nbsp; at Reports.Download_click(Object sender, EventArgs e) in c:\\\\Inetpub\\\\wwwroot\\\\MGS2\\\\Reports.aspx.cs:line 303&quot;</p>\r\n<p>HOWEVER, a prompt to save/open the zip file appeared and the zip file did contain the expected files!&nbsp; The exception didn't stop the program so if you're not debugging, the program functions normally, correctly zipping the files.</p>\r\n<p>Thoughts?????????</p>",
    "PostedDate": "2009-05-08T06:19:18.007-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "188136",
    "ThreadId": "38210",
    "Html": "<p>OK, things are clearer now.</p>\r\n<p>As for the ThreadAbortException, I think that can occur when you have a debug session that exceeds the timeout value for the HTTP protocol.&nbsp; If you are working in your debugger for a long time, the HTTP session can end, so Response.End() will fail, even though the response really did get all sent out.&nbsp; So I wouldn't worry about that.</p>\r\n<p>On the NotSupportedException when trying to read the Length property - I see that MessageBodyStream (which is the type you get back from WCF) does not support Seek nor Length.&nbsp;&nbsp;</p>\r\n<p>Thinking about it, DotNetZip should work with a non-seekable stream as input. It tries to get the length of the stream, but it shouldn't fail if that is not possible.&nbsp; So I think this is a bug in DotNetZip.&nbsp; If you don't mind I'd like to prepare a fix and ask you to test it.</p>\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>",
    "PostedDate": "2009-05-08T07:03:58.487-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "188138",
    "ThreadId": "38210",
    "Html": "This discussion has been copied to a work item. Click <a href=\"http://dotnetzip.codeplex.com/WorkItem/View.aspx?WorkItemId=7742\">here</a> to go to the work item and continue the discussion.",
    "PostedDate": "2009-05-08T07:05:53.28-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "188147",
    "ThreadId": "38210",
    "Html": "<p>To get the fix, I'd like you to try out either v1.8.3.1, or v1.7.2.18.&nbsp;</p>\r\n<p>&nbsp;</p>",
    "PostedDate": "2009-05-08T07:43:18.433-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]