views:

26

answers:

1

Hey all,

I am looking at writing a silverlight app that I plan to use OOB setting to enable use on both PC and mac.

I have been doing a little investagation on the isolationstoragefile and what I understand is it will work for both pc and mac without a problem.....Is that correct?

The application I am building is going to be a business application that will submit details back to the main database if there is an available connection. If not then I want to store the information locally until there is an available connection.

My question is lets say I have 3 user accounts using the same machine. Can I have the isolationfile stored in the same place? or must it be under the user profile?

I don't want to have orphaned records which I could see happening if the data is stored on each user's profile.

Any advise would be great!

A: 

I understand is it will work for both pc and mac without a problem.

That is correct. You don't need to worry about the mechanics of how it is persisted to disk.

I have 3 user accounts using the same machine. Can I have the isolationfile stored in the same place? or must it be under the user profile?

IS is located under the user profile. In a full trust (elevated) OOB app you may be able to store files elsewhere on the file system by using the FileSystemObject or by using some COM interop, but there is no guarantee that you can get to that file again (NOTE: i haven't played with saving files external to IS, so may be wrong/misinformed on this). If you can whack files out to anywhere on the file system you should be very careful doing it - what if you are running on a Mac?

I don't want to have orphaned records which I could see happening if the data is stored on each user's profile.

If you mean data may be stored locally because of no connection, then that user logs off and never logs back in again to that machine so their data never syncs to the server, then yes that is a possibility. Having a service monitoring for saved data files would be ideal, but you can't do that under SL. To completely eliminate that issue may take a change in your product, like writing it as a WPF client instead of SL.

slugster
Hey Slugster, thanks for your comments they help.
Sorry what I meant with the records is I was going to create an xml file to store the data in. I dont want to have 3 different xml files running on the machine I figured if I could get them into one location that would be good. I am not sure the difference where mac vs pc stores the file I was going to do some testing in the weekend
I was hoping to be able to add the file to something like c:\MyApp\file.xml but dont think life is going to be that easy. I have the application written currently in WPF but I have a couple of customers using macs that want the product so I was hoping to port the wpf code over to silverlight.