IsolatedStorage question

Aug 27, 2011 at 5:32 PM


I am using an isolatestorage file to store logs in an in-Browser application. 

My question here is, if the application ends up using the entire 1MB of default storage given to a file, what would happen? Would Windows keep only the recent 1MB of logs and remove the old ones?


I am asking this question in order to determine whether to use FileMode.Append or FileMode.Truncate while opening the file. 


If I were to use FileMode.Append, after a few days/months of the application lifecyle, the 1MB storage may get used up and thus the question.


thanks in advance,

Aug 30, 2011 at 11:35 PM

This is more about Silverlight in general so you might want to post to the forum.

However, my off-the-cuff advice would be to create multiple files for each video session. Keep track of the length of the files + what you're trying to write. If you're over the quota, drop the oldest file. If there are no files to drop, start over or stop writing. I'm sure there are more fancy ways to handle this too -- just depends on how valuable the data is and what lengths you want to go through to keep as many bytes as you can.

fyi: There's also an API in Silverlight to ask the user to increase their quota.

Aug 31, 2011 at 8:28 PM

Tim, thanks for the reply.