Home Forums .NET libraries Xceed Zip & Real-Time Zip for .NET InvalidZipStructure error

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #19538 |

    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)
    Member
    Post 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)
    Member
    Post count: 23064

    Hello:
    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.
    Regards,
    Lluís Viñas

    Imported from legacy forums. Posted by Lluís (had 437 views)

    User (Old forums)
    Member
    Post 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)
    Member
    Post 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.

    Try
    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
    End If
    Catch e1 As InvalidZipStructureException
    MessageBox.Show(“The Zip archive is either corrupted or not a valid archive.”, “Error”, MessageBoxButtons.OK, MessageBoxIcon.Error)
    Catch
    MessageBox.Show(“An error occured while reading the archive.”, “Error”, MessageBoxButtons.OK, MessageBoxIcon.Error)
    End Try

    If debugging, you moves the execution cursor from the Catch to the Try statement again, it works correctly.

    Is really very strange!.

    Best Regards

    Imported from legacy forums. Posted by Lluís (had 431 views)

    User (Old forums)
    Member
    Post 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.

    Thanks.

    Imported from legacy forums. Posted by André (had 217 views)

    User (Old forums)
    Member
    Post count: 23064

    The issue reported here is a bug that has been fixed. The fix will be available from version 3.5.7254 and up.

    Imported from legacy forums. Posted by André (had 5677 views)

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.