My program lets users add files to a zip file one upload at a time. The first upload creates a zip file, and subsequent uploads add to the created file. It also displays a list of all the files in the zip file, and lets users delete individual files.
I use SharpZipLib and this works perfectly on my local computer, but once I uploaded it to the server it started crashing at CommitUpdate()
The original upload that creates the zip file is fine, but adding to the zip file, or deleting from it gives:
Could not find file 'W:\MyZipFile.zip.151.tmp'.
If I leave the window alone for a while, I can delete one file or add one file before the error starts again.
My add file method:
ZipFile z = null;
if (System.IO.File.Exists(filePath + zipFilename))
z = new ZipFile(File.OpenRead(filePath + zipFilename));
else
z = ZipFile.Create(filePath + zipFilename);
z.BeginUpdate();
z.Add(filePath + filename, filename);
z.CommitUpdate();
z.Close();