This project is read-only.

unzip password protected files - c# - .net 4.5

Feb 16, 2016 at 8:37 AM
Edited Feb 16, 2016 at 8:39 AM
I have started using the dotnetzip ...

Downloaded it and in ssis script task referencing Ionic.ZIP.dll

in script, I am using using Ionic.ZIP and then in the main:
public void Main()
        string zipFullPath = @"\\Work\Files\ZIP\";
        string zipFullPath_Input = @"\\Work\Files"
        string zipPassword = "12345";

        // extract all files into 
        using (var zip = ZipFile.Read(zipFullPath))
            zip.Password = zipPassword;

        Dts.TaskResult = (int)ScriptResults.Success;

but I get the following error:

at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)

at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)

at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)