Hi. It's my first time using DotNetZip. Seems like a great tool, but I'm banging my head against the wall trying to figure this out. I'm trying to enable the downloading of files checked on a vb.net webpage. It seems to fail when
I hit the line "zip.Save(Response.OutputStream)".
Here is the error message:
Message: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server
trace is enabled.
Details: Error parsing near 'PK'.
And here is the relevant portion of code I'm using to attempt this:
Dim downloadFileName = "Files.zip"
Response.AddHeader("content-disposition", "filename=" & downloadFileName)
Response.ContentType = "application/zip"
Dim connStr As String
connStr = ConfigurationManager.ConnectionStrings("accessConnStr").ConnectionString
Dim Conn As New OleDbConnection(connStr)
Dim cmd As New OleDbCommand("select * from filesUpload where id in(" & strID & ")", Conn)
Dim rdr As OleDbDataReader
rdr = cmd.ExecuteReader()
Using zip As New ZipFile()
Dim fileName = ""
fileName = rdr("fileName")
zip.AddFile("c:/inetpub/wwwroot/gat/docs/" & projID & "/" & fileName, "Requested Files")
Any ideas as to what I'm doing wrong and causing this error are greatly appreciated. Thanks.