我正在使用此代码在服务器中解压缩和加密zip文件。但是它给了我一个错误 - 无法将其读作ZipFile。这有什么不对?
string extractPath = servermapPath;
ZipFile zip = new ZipFile();
if (zipPath != "")
{
zip = ZipFile.Read(zipPath);
Directory.CreateDirectory(extractPath);
foreach (ZipEntry e in zip)
{
//e.Extract(extractPath, ExtractExistingFileAction.OverwriteSilently); //It is for Normal Zip File.
e.ExtractWithPassword(zipPath, "#####");
UnzipFileExt = e.FileName;
}
}