I have developed a system to send a mail with attachments (zip files). One of the attachment is a folder, which I convert it to Zip file before send. Mails are sent perfectly. However, after I sent the mail with Zips whenever I try to access the Isolated Storage again or do any modification to files in isolated storage I get an Operation not permitted on IsolatedStorageFileStream..
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();
}
isf.Dispose();
isf = null;
What code am I missing or is there any operation that I have to do differently?
Thanks in advance