Extract password protected 7z file using Aspose.Zip

Hello,

For my client that purchased Aspose.all license for internal use, we want to know if there is a code implementation for extracting password protected 7z file included with the product(Aspose.Zip or??) and code for detecting that a 7z file is protected.

I have found this code bellow :
using(var archive = new SevenZipArchive(archivePath, “password”))
{
// Extract or open 7z archive with password.
archive.ExtractToDirectory(destination);
}

but this code is not working as after extraction of the file because when i try to open one of the files inside the generated folder it indicates an error has occurred and i can’t read the file.

Thanks for your answer.
Best regards,

@DAHMABIR

Hello,

Thank you for reaching out! Here’s the information regarding paid support for Aspose.Slides:

  1. Paid Support Plans:

    • Priority Support: Faster response times and dedicated support.
    • Enterprise Support: Comprehensive support with additional features tailored for larger organizations.
  2. Information Needed to Proceed:

    • Company name
    • Use case for Aspose.Slides
    • Number of users/seats
    • Desired SLA urgency (e.g., standard, priority)
    • Region (for support availability)
    • Preferred payment method
    • Contact email and phone number
  3. Next Action:

    • We can connect you with our sales team during business hours to discuss your needs further. Please provide the requested information, and we’ll get started!

Best regards,
[Your Name]
Aspose Sales Engineer

Company : Scor (location FRANCE)
Product : Aspose.All

Hello @DAHMABIR,
Did the extraction succeed?

If it did, but extracted files have smaller size than them initially had and can’t be opened with their application, then reason is the license of Aspose.Zip was not applied, so trial restriction took place.

Otherwise, in case there is an exception raised by extraction code, can you send this file for us to review?
If you can not, please execute the following scripts in the command line and show the result.
7z.exe l -slt myArchive.7z and
7z.exe t myArchive.7z
7z.exe is the command line tool that comes with 7-zip installation, usually in C:\Program Files\7-Zip\