unzip password protected files - SSDT - .net 4.5

  • I have started using the dotnetzip from codeplex ...

    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 = Dts.Variables["User::FileNameFullPathZIP"].Value.ToString();

    string zipFullPath_Input = Dts.Variables["User::FileNamePathZIP_Input"].Value.ToString();

    string zipPassword = Dts.Variables["User::Password"].Value.ToString();

    // extract all files into

    using (var zip = ZipFile.Read(zipFullPath))

    {

    zip.Password = zipPassword;

    zip.ExtractAll(zipFullPath_Input);

    }

    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)

    at Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTATaskScriptingEngine.ExecuteScript()

  • Perhaps the author of the DLL can help you.

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.

  • I think any third party DLL's need to be in the GAC for SSIS

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply