Click here to Skip to main content
15,892,517 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Error :

C#
An unhandled exception of type 'System.NotSupportedException' occurred in ICSharpCode.SharpZipLib.dll

Additional information: Compression method not supported


What I have tried:

C#
public static bool IsPasswordProtectedZipFile(string path)
        {            
            using (FileStream fileStreamIn = new FileStream(path, FileMode.Open, FileAccess.Read))
            using (ZipInputStream zipInStream = new ZipInputStream(fileStreamIn))
            {
                ZipEntry entry = zipInStream.GetNextEntry();
                return entry.IsCrypted;
            }
        }
Posted
Updated 24-Mar-16 20:09pm
v2

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900