[
  {
    "Id": "419131",
    "ThreadId": "205224",
    "Html": "<p>Hi,</p>\r\n<p>I've tested the dotnetzip utility in a web application of mine, but experience problems with Firefox 3.6.<br>After I've downloaded a zipfile successfully and then navigate I get a strange error:</p>\r\n<p><span style=\"font-size:x-small\">XML-lesefeil: ikke velformet<br>Plassering: <a href=\"http://localhost/blkdb/templates/Pages/DownloadForms.aspx\">http://localhost/blkdb/templates/Pages/DownloadForms.aspx</a><br></span></p>\r\n<p><span style=\"font-size:x-small\">Linjenummer 1, kolonne 3274:0Z5FgPexNF4xXs8OPhusBuB1gYy&quot; /&gt;<br>--------------------------------------------------------------------------^&nbsp;</span></p>\r\n<p><span style=\"font-size:x-small\">It says xml read error, not well formed, &nbsp;linenumber, column and the error is indicated on the quotation mark.<br>The error seems to have something to do with the viewstate value.<br>Other times it indicates slash at the start of the viewstate value.</span></p>\r\n<p><span style=\"font-size:x-small\">After generating the zip file I have code for downloading the file. Goes like this:</span></p>\r\n<p><span style=\"font-size:x-small\">\r\n<pre>        public static void DownloadForm(string formfile, String filename)\r\n        {\r\n            byte[] byteArray = File.ReadAllBytes(formfile);\r\n            HttpContext.Current.Response.Clear();\r\n            HttpContext.Current.Response.ContentType = &quot;application/zip&quot;;\r\n            HttpContext.Current.Response.AddHeader(&quot;Content-Disposition&quot;, &quot;attachment;filename=&quot; + filename);\r\n            HttpContext.Current.Response.AddHeader(&quot;content-length&quot;, byteArray.Length.ToString());\r\n            HttpContext.Current.Response.BinaryWrite(byteArray);\r\n        }</pre>\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>\r\n</span></p>\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>\r\n<p>&nbsp;It works okey in IE, but not in Firefox.</p>\r\n<p>Anybody who as any ideas? In advance thanks for your reply!</p>\r\n<p>Kind regards,</p>\r\n<p>Jon Haakon</p>\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>",
    "PostedDate": "2010-03-17T03:43:32.457-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "419191",
    "ThreadId": "205224",
    "Html": "<p>if I were you I would attach an http debugger to the page, to see what is being received by firefox.&nbsp; <a href=\"http://www.fiddler2.com\">Fiddler</a> is a good one.</p>\r\n<p>It could be that the page, defined in .aspx, is not effectively changing its content type for firefox, for some reason.&nbsp;&nbsp;</p>\r\n<p>Independently of what you learn from Fiddler, You may wish to try some of these things to avoid the problem:</p>\r\n<ul>\r\n<li>Insert a Response.Close() after Response.BinaryWrite()</li>\r\n<li>Put the code that generates and downloads the .zip file into a .ashx (HttpHandler) module</li>\r\n<li>move to ASPNET MVC, and configure this code as an Action on a Controller. </li>\r\n</ul>\r\n<p>None of these things have anything to do with DotNetZip.&nbsp; You're simply downloading some binary content into a browser.&nbsp; That the content was originally from DotNetZip is sort of tangential to the main plot.&nbsp; So if these suggestions don't help, I'd suggest trying a more generat forum for web development - they may have better ideas.</p>\r\n<p>Good luck.</p>",
    "PostedDate": "2010-03-17T06:03:49.823-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "419221",
    "ThreadId": "205224",
    "Html": "<p>Hi,</p>\r\n<p>Thanks for the reply!</p>\r\n<p>I seems like the &quot;Response.End()&quot; did it. :)</p>\r\n<p>I had previously used &quot;Response.Close()&quot;, but that gave an error. &quot;End&quot; works better.</p>\r\n<p>Fiddler reported :</p>\r\n<p>Fiddler has detected a protocol violation in session #5. Content-Length mismatch: Response Header claimed&nbsp;xxxxx bytes, but server sent xxxx&nbsp; bytes.&nbsp;</p>\r\n<p>Kind regards,</p>\r\n<p>Jon Haakon</p>",
    "PostedDate": "2010-03-17T07:04:18.843-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "419242",
    "ThreadId": "205224",
    "Html": "<p>Well, I thought it fixed the problem however, it generates an error that my application ignores.</p>\r\n<p>In debug I get a compilererror:</p>\r\n<p>Thread aborted.</p>\r\n<p>&quot;Message = Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack.&quot;</p>\r\n<p>&nbsp;</p>\r\n<p>Jon Haakon</p>",
    "PostedDate": "2010-03-17T07:57:44.053-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "419341",
    "ThreadId": "205224",
    "Html": "<p>Response.End() will abort the thread.&nbsp; Always.</p>\r\n<p>It's why I suggest Response.Close().&nbsp;</p>\r\n<p>Not sure about that content-length mismatch though. That bears further investigation.</p>\r\n<p>You may want to try including a</p>\r\n<pre>    Response.BufferOutput= false;</pre>\r\n<p>just after calling Response.Clear().&nbsp;</p>\r\n<p>&nbsp;</p>",
    "PostedDate": "2010-03-17T10:56:42.593-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]