|
Hi Cheeso,
I am getting the similar error when trying to run the zipped exe that is created by Ionic 1.9. I have a folder in which 3 files total size 470mb.I have to create zipped exe for this folder . Zip exe is created fine. this exe need to be downloaded by client
browser.After the client downloaded this exe ,then unable to run or extract this exe. when try to run this exe,he is getting the error as
exception while resetting size ionic.zip.zipexception Ionic.Zip.ZipException: Cannot read that as a ZipFile ---> Ionic.Zip.BadReadException: Bad signature (0x00905A4D) at position 0x00000000
The code below is :
-- creating zip exe code
Using zip1 As New ZipFile()
zip1.AlternateEncodingUsage = Ionic.Zip.ZipOption.Always
zip1.AlternateEncoding = Text.Encoding.UTF8
zip1.UseZip64WhenSaving = Zip64Option.AsNecessary
zip1.AddDirectory(sMoveDirectory)
zip1.Comment = "This will be embedded into a self-extracting exe"
Dim sSaveOption As New SelfExtractorSaveOptions
sSaveOption.Flavor = SelfExtractorFlavor.WinFormsApplication
sSaveOption.Quiet = False
zip1.SaveSelfExtractor(StageDir & "\" & sTargetFile & ".exe", sSaveOption)
End Using
--- the downloading exe code
filename = "ABC.exe" ' zipped exe created using ionic.zip at server
strStagingPath = "\\servername\" & filename
'downloadexe(strStagingPath, filename)
'strStagingPath = Application("AnswerLinkPublicRoot") & "\staging\" & filename
'strStagingPath = "\\inhyvwxtreamspt\eservice\webs\es\public\staging\" & filename
Dim strContentType As String = "application/octet-stream"
Response.AddHeader("Content-disposition", "attachment; filename=" & filename)
Response.ContentType = strContentType
Response.WriteFile(strStagingPath)
HttpContext.Current.ApplicationInstance.CompleteRequest()
please help me
Thanks
krishna
|