2

I'm creating a C# Metro/Modern UI app, and I need a way to handle some user data (mostly just small strings, but a fair amount of them), and specifically I'd like the data to 'roam' with a user's Microsoft Account. I know that you can handle this with roamingSettings, but it seems like that's supposed to be used more for like storing user IDs and other one-time settings, whereas I would be using it to store all of my app's data, and there seems to be a limit to the amount of space I get with that. I was thinking about using SkyDrive to host a "MyApp Data" folder, but I can't seem to figure out how to upload a simple text file to it :(

It seems like the best way to handle it would be to set up an account on Azure or EC2 and then make a simple PHP API so I could access the SQL database from my app, but I'd rather not have to pay for hosting.

I've seen other questions about Metro app storage on StackExchange and Microsoft's own forums, but most of those are in reference to local storage and using SQL servers to handle the storage.

So should I just use roamingSettings and keep an eye on the quota, should I try to use cloud hosting, or is there a better solution I just haven't thought of yet?

Thanks!

4

2 回答 2

1

关于漫游设置的一些事情: - 它们是为此而设计的,设置。不是作为数据复制方案,因此是配额 - 它们不是即时的。您可以创建一个名为“highpriority”的设置,该设置将在不到一分钟的时间内复制,但其他设置可能需要几分钟才能复制。如果您需要立即使用数据,则不能选择漫游设置。此外,如果超出配额,所有数据都将停止复制,这是一件坏事。:) 即使设置相同,它也不会在您的应用程序的不同版本之间复制。此外,如果您有一段时间(默认为 30 天)不使用该应用程序,则漫游数据将从云端删除。我很确定漫游数据也可以通过企业设置中的组策略关闭。

您可以利用 SkyDrive。确保下载 Live SDK。使用 SkyDrive 的概述在这里... http://msdn.microsoft.com/en-us/library/live/hh826521.aspx 从根本上说,它只是 REST API 的集合。有关将文件上传到 SkyDrive 的应用程序,请参阅 SkyDrive 照片示例 http://code.msdn.microsoft.com/windowsapps/Live-SDK-Windows-Developer-8ad35141

于 2012-08-23T03:18:32.660 回答
0

我会选择基于云的解决方案。一位 MS 员工告诉我,漫游数据是“尽力而为”,无法控制它是否真的有效,有时有效,有时无效。

就我个人而言,我会尝试使用 skydrive 选项

于 2012-08-22T12:12:20.087 回答