I have a directory and I'm using a compression tool to compress directory into a zip file but after I finished the zipping operation I get an error saying: isolated storage operation not permitted.
This error only occurs occasionally.
IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForApplication();
C1ZipFile zip = new C1.C1Zip.C1ZipFile();
if (isf.DirectoryExists("SFA_DB") == true)
{
var fs = isf.CreateFile("\\SFA_DB.zip");
zip.Create(fs);
foreach (string fileName in isf.GetFileNames("SFA_DB\\*.*"))
zip.Entries.Add(isf.OpenFile("SFA_DB\\" + fileName, FileMode.Open), fileName);
fs.Close();
fs.Dispose();
zip.Close();
}
//Last Two Lines I have writtent recently
isf.Dispose();
isf = null;
Zipping tool is provided by Component One C1.Phone.Zip.8
Is there anything I'm doing wrong or misunderstanding ?