tags:

views:

24

answers:

1

Silverlight uses an IsolatedStorageFileStream to open files.

I am trying to determine if I need to watch for locking issues when opening a file in Silverlight. In other words, can a file be opened by Silverlight and some other Windows (let's say W7) application at the same time.

If so, any ideas on how to handle locking?

+1  A: 

Technically, yes, an unmanaged app can access any file. The odds that such an app would just happen to open the file exclusively and lock you out are however vanishingly small. The directories containing isolated storage files are not found by accident.

Don't discount the possibility that it is another instance of your Silverlight app that has the file opened, that's far more likely. Having a reasonable failure mode for an IOException is always a good idea. A "sorry, couldn't do it" message is acceptable.

Hans Passant
Any ideas on how to handle the locking between Silerlight instances?
Noah