1

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!

4

1 回答 1

0

我知道它适用于 pc 和 mac 都没有问题。

那是对的。您无需担心如何将其持久化到磁盘的机制。

我有 3 个用户帐户使用同一台机器。我可以将隔离文件存储在同一个地方吗?还是必须在用户配置文件下?

IS 位于用户配置文件下。在完全信任(提升的)OOB 应用程序中,您可以使用 FileSystemObject 或使用某些 COM 互操作将文件存储在文件系统的其他位置,但不能保证您可以再次访问该文件(注意:我没有'没有在 IS 外部保存文件,所以可能是错误的/错误的)。如果您可以将文件输出到文件系统上的任何位置,您应该非常小心 - 如果您在 Mac 上运行怎么办?

如果数据存储在每个用户的个人资料中,我不希望出现孤立记录。

如果您的意思是数据可能由于没有连接而存储在本地,那么该用户注销并且永远不会再次登录到该计算机,因此他们的数据永远不会同步到服务器,那么是的,这是一种可能性。对保存的数据文件进行服务监控是理想的,但在 SL 下您不能这样做。要完全消除该问题,可能需要对您的产品进行更改,例如将其编写为 WPF 客户端而不是 SL。

于 2010-09-17T02:26:01.047 回答