User (Old forums)MemberJanuary 13, 2006 at 6:09 pmPost count: 23064
I have this code to zip the source folder contents and copy it to destination folder. It works fine in my Windows XP machine but fails with an exception on an Windows 2000 box. Not sure if operating system matters or not. Here is the code. Please help as I have spent so much time reading on this one.
FtpConnection Connection = new FtpConnection(HostName);
Connection.TraceWriter = new System.IO.StreamWriter(LogFileName); AbstractFolder SourceFolder = new DiskFolder(FolderName);
AbstractFile ZipFile = new FtpFile(Connection, SiteName + “.zip”);
AbstractFolder DestFolder = new ZipArchive(ZipFile);
SourceFolder.CopyFilesTo(DestFolder, false, true);
Error occurs on the last line saying “InvalidZipStructure Exception”
Imported from legacy forums. Posted by New2Xceed (had 5771 views)User (Old forums)MemberApril 13, 2006 at 2:38 pmPost count: 23064
This error was caused by an old limitation of Xceed Zip that did not support more than 4gig. This is no longer an issue since the control supports more than 4 gig.
Imported from legacy forums. Posted by Matt (had 190 views)User (Old forums)MemberMarch 9, 2007 at 7:24 amPost count: 23064
I’m having the same problem with ZIP for NET v.3.2 and I tried withou success with v.3.3.
The problem is only with some zip files and is not related to the size. If I download the zip file I can open without error.
I’m using your Windows Explorer sample.
Imported from legacy forums. Posted by Lluís (had 437 views)User (Old forums)MemberMarch 9, 2007 at 2:12 pmPost count: 23064
Can you provide more details? What is the exact exception you are getting? The sample works fine here with zip files, either downloading or uploading them.
Imported from legacy forums. Posted by André (had 217 views)User (Old forums)MemberMarch 19, 2007 at 7:43 amPost count: 23064
Sorry for the delay.
We have a program that zips and sends via FTP the zip files to a server (a kind of backup app). When we need to restore files, we connect to the FTP server (we tried two FTP servers) and with a small program, does the restoration with remote unzipping the files.
With XP workstations there are no problems, but with Win 2000 prof. (updated with the last hotfixes and service packs), with some of the files we get an InvalidZipStructureException. If we download locally the files (from 20MB to 800MB), we can do the restoration without problems.
We tried with a program that does remote unzipping, Loadscout, and works without problems.
We tried with your sample Xceed Windows Explorer and I see a very curious behavoir:
The first time the code calls the method InitializeFolder of class ZipArchiveTreeViewNode, throws a Xceed.Zip.InvalidZipStructureException.
m_zipArchive = New ZipArchive(CType(IIf(TypeOf m_item Is AbstractFile, m_item, Nothing), AbstractFile))
m_zipArchive.DefaultEncryptionPassword = Options.ZipDefaultEncryptionPassword
m_zipArchive.DefaultCompressionLevel = Options.ZipDefaultCompressionLevel
m_zipArchive.DefaultCompressionMethod = Options.ZipDefaultCompressionMethod
m_zipArchive.DefaultEncryptionMethod = Options.ZipDefaultEncryptionMethod
m_zipArchive.DefaultEncryptionStrength = Options.ZipDefaultEncryptionStrength
If Options.ZipLastDecryptionPasswordUsed.Length > 0 Then
m_zipArchive.DefaultDecryptionPassword = Options.ZipLastDecryptionPasswordUsed
Catch e1 As InvalidZipStructureException
MessageBox.Show(“The Zip archive is either corrupted or not a valid archive.”, “Error”, MessageBoxButtons.OK, MessageBoxIcon.Error)
MessageBox.Show(“An error occured while reading the archive.”, “Error”, MessageBoxButtons.OK, MessageBoxIcon.Error)
If debugging, you moves the execution cursor from the Catch to the Try statement again, it works correctly.
Is really very strange!.
Imported from legacy forums. Posted by Lluís (had 431 views)User (Old forums)MemberMarch 20, 2007 at 2:28 pmPost count: 23064
Can you send an email to support, so we can open a case for this issue? We would like to investigate this further, and it is easier to follow a problem when it is logged into our tracking system.
Imported from legacy forums. Posted by André (had 217 views)
- You must be logged in to reply to this topic.