I got requirement to unzip a file which contains password protected text files in zip file.which have to be done in SSIS package..
I have googled and download a dll called Ionic.Zip to used in script task.
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