Hello I had requirement to create and save ZIP file in asp.net C#.
I have implemented it on my local machine, it works fine but once I published it on server it doesn't work please suggest in my below code:
(zip file is not saving in required folder after publishing project)
using (ZipFile zip = new ZipFile())
{
zip.AlternateEncodingUsage = ZipOption.AsNecessary;
zip.AddDirectoryByName("Files");
foreach (GridViewRow row in gvfiles.Rows)
{
string filePath = @"G:\Work_Backup2020\OjasTax\OjasTax\OjasTax\OjasTax" + (row.FindControl("lblpath") as Label).Text;
zip.AddFile(filePath, "Files");
}
zip.Save(@"G:\Work_Backup2020\OjasTax\OjasTax\OjasTax\OjasTax\Zip\file.zip");
}