IE10 fails to create zip file

Apr 26, 2013 at 10:19 AM
I have been using DotNetZip for a few years now, without incident.
With the release of IE10, the code fails, with error message "The (zipname) download was interrupted"
The code works fine in other browsers.

Can anyone help here please?

Code being used:

Response.Clear()
Response.BufferOutput = False

Dim archiveName As String = String.Format("{0}-" & Request("p") & ".zip", DateTime.Now.ToString("yyyy-MMM-dd-HHmmss"))

Response.ContentType = "application/zip"
Response.AddHeader("content-disposition", "filename=" + archiveName)

If HeaderSize <> 0 Then
Response.AddHeader("Content-Length", HeaderSize)
End If

Using zip As ZipFile = New ZipFile()
                zip.AddFiles(filesToInclude, "")
                zip.Save(Response.OutputStream)
End Using


Response.Close()
Aug 19, 2013 at 12:17 PM
Hi Rob,

Try using "Response.End()" instead of "Response.Close()". I was facing the same issue. "Response.End()" did the job for me. You code will be like:

Response.Clear()
Response.BufferOutput = False
Dim archiveName As String = String.Format("{0}-" & Request("p") & ".zip", DateTime.Now.ToString("yyyy-MMM-dd-HHmmss"))
Response.ContentType = "application/zip"
Response.AddHeader("content-disposition", "filename=" + archiveName)

If HeaderSize <> 0 Then
Response.AddHeader("Content-Length", HeaderSize)
End If

Using zip As ZipFile = New ZipFile()
            zip.AddFiles(filesToInclude, "")
            zip.Save(Response.OutputStream)
End Using
Response.End()

I hope it does resolve your problem. Let me know how it goes.
Dec 16, 2013 at 4:19 PM
This does not resolve the issue as stated above. I have the same issue and cannot find the resolution. This failure also happens in ie 11 in compatibility view.
Dec 16, 2013 at 8:45 PM
You definitely don't want to call Response.Close(); see http://blogs.msdn.com/b/ieinternals/archive/2012/07/16/content-length-and-transfer-encoding-validation-in-ie10-download-manager-couldnt-be-downloaded-retry-cancel.aspx

If you perform your download with Fiddler running, you'll probably get a HTTP-protocol warning showing what's wrong with the download.