使用Ionic.Zip DLL在SSIS解压密码保护的文件

编程入门 行业动态 更新时间:2024-10-28 04:24:58
本文介绍了使用Ionic.Zip DLL在SSIS解压密码保护的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有要求,解压缩包含在压缩密码保护的文本文件fil​​e.which在SSIS包..

I got requirement to unzip a file which contains password protected text files in zip file.which have to be done in SSIS package..

我用Google搜索和下载要做一个文件一个名为Ionic.Zip DLL在脚本任务中使用。

I have googled and download a dll called Ionic.Zip to used in script task.

我已经使用使用C#中的脚本任务。

i have used the below code using c# in script task..

using Ionic.Zip; public void Main() { Dts.TaskResult = (int)ScriptResults.Success; start obj= new start(); obj.decrypt(); } public class start { public void decrypt() { string sfilepath ="E:\\shekar\\CIF_Files\\USAGE.zip"; ZipFile fileToExtract = new ZipFile(sfilepath); fileToExtract.Password = "ftp122"; fileToExtract.ExtractAll("E:\\shekar\\CIF_Files"); } }

但我得到一个异常味精如下

But i am getting an exception msg as below

我有谷歌了很多。但无法找到正确的解决方案。没有任何一个证明我的回答

I Had google a lot. but can't find correct solution. does any one prove me answer

推荐答案

可以确保以下两个步骤都做了什么?

Can you make sure below two steps are done?

  • 注册在GAC定义DLL(确保dll是签订强密钥..大多数第三方DLL是签名,希望你被覆盖)
  • 将您的dll在以下位置C:\Program文件(x86)\Microsoft SQL Server\\SDK\Assemblies\ C:\Program Files\Microsoft的SQL Server \\SDK\Assemblies\
  • 这就是它。检查的这个博客帖子获取更多信息。

    Thats it.. Check this blog post for more info

    更多推荐

    使用Ionic.Zip DLL在SSIS解压密码保护的文件

    本文发布于:2023-11-06 13:14:23,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1563785.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:密码保护   文件   Zip   Ionic   SSIS

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!