isolatedstorage

windows phone 7 - loading a big xml file

孤人 提交于 2019-12-06 06:02:51
问题 I am trying to load a xml file to my app and show it on a ListBox. The problem is that the xml file is about 5 MB, and it takes about 40 seconds on the phone to load. and when the phone locks the screen and returns back it takes another 40 seconds. I tried to use the isolatedstorage to store the data on it but it didn't improve performance. This is my code to load the data: XDocument loadedData = XDocument.Load("BigFile.xml"); var data = from query in loadedData.Descendants("w") orderby

Isolated Storage security exception on windows phone

廉价感情. 提交于 2019-12-06 05:11:33
Im trying to persist some data but im getting an error here. Declaration of isolated storage inside my public partial mainpage class IsolatedStorageSettings settings = IsolatedStorageSettings.ApplicationSettings; implementation of onNavigatedFrom protected override void OnNavigatedFrom(System.Windows.Navigation.NavigationEventArgs e) { settings.Add("list",listBox1.ItemsSource); settings.Save(); } When I hit the start button on the emulator I get a security exception: System.Security.SecurityException was unhandled Message=SecurityException My listbox is binded to data coming from a xml. I´m

Read and write list to IsolatedStorage in Windows Phone 8

六月ゝ 毕业季﹏ 提交于 2019-12-06 02:45:52
问题 I'm trying to simply save a list of strings to isolated storage on windows phone 8. I have simply created a list and save it this way: IsolatedStorageSettings settings = IsolatedStorageSettings.ApplicationSettings; List<String> projectList = new List<String>(); projectList.add("yo"); settings.add("yo", projectList"); settings.Save(); How do i read this data from IsolatedStorage and put it into the same list once the app starts up again? I'm looking for a simple method - which i haven't found

IsolatedStorageFile exception

感情迁移 提交于 2019-12-05 19:17:54
I try to create IsolatedStorageFile with the following code: IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForApplication(); but I get the following exception: IsolatedStoredException "Unable to determine application identity of the caller." What could be the possible reason of this? If you're seeing this while debugging, you can resolve it by enabling ClickOnce security settings by going to the Security tab in your project's properties. This will simulate the manifest required to have an application identity while debugging. Note that there is an apparent bug in Visual Studio (at

Accessing images from isolated storage in XAML using “isostore:/” scheme

北城以北 提交于 2019-12-05 17:56:14
I've downloaded images from the web and saved them to the Isolated Storage and now I want to access those images in my XAML file, giving a Uri as a reference to them. I have verified with IsoStoreSpy that they are stored properly where I would expect them to be and I can create BitmapImages from them if I open the file and read in the byte stream. But now I want to optimize my image handling by passing just a Uri from my model to the IsolatedStorage location and letting my XAML load the image. <Image Height="120" Width="120" Stretch="Uniform" HorizontalAlignment="Left"> <Image.Source>

Storing a large list in isolatedStorage on WP7

扶醉桌前 提交于 2019-12-05 15:18:16
I'm storing a List with around 3,000 objects in Isolatedstorage using Xml serialize. It takes too long to deserialize this and I was wondering if you have any recommendations to speed it up. The time is tolerable to deserialize up to 500 objects, but takes forever to deserialize 3000. Does it take longer just on the emulator and will be faster on the phone? I did a whole bunch of searching and some article said to use a binary stream reader, but I can't find it. Whether I store in binary or xml doesn't matter, I just want to persist the List. I don't want to look at asynchronous loading just

Preserving login session across multiple Android apps

浪子不回头ぞ 提交于 2019-12-04 16:28:39
I have two apps that both log in to the same system but they have separate functions and may not both be installed at the same time. I can sign the two apps with the same signature no problem, even make them run in the same process. How can I store the login cookie (among other things) in such a way that it is shared by both apps and still be secured from unknown apps? Shared user ID should get you access to each other's private storage, you would just need to figure out if the other was already installed, figure out the absolute path to its private storage and then look and see if it had the

Silverlight: Log4Net to Isolated Storage

 ̄綄美尐妖づ 提交于 2019-12-04 12:57:42
First, I know about Clog , and I do not want to implement this piece. The reason? We can't maintain severeal logging 'frameworks'. So to my question: Is it possible to implement log4net in a Silverlight application? What I want to achieve is logging to the Isolated Storage . I know, there's only 1 MB of storage available, but this limit can be increased (the user has to accept this, I know too). By the way, please don't provide me alternatives. I do only want to know if somebody implemented a log4net to isolated storage . I cannot imagine that it is possible. You would have to download the

How do you get a flat listing of all files in IsolatedStorage?

我的未来我决定 提交于 2019-12-04 11:57:44
I need to get a list of all files in a given IsolatedStorage folder. There are sub folders off the root of the IsolatedStorage and these need to be included in the list. The usual System.IO classes can't be used with IsolatedStorage. Tom Robinson Here's what I've come up with - it works but I'd be interested to see if there are better alternatives: using System.Collections.Generic; using System.IO; using System.IO.IsolatedStorage; using System.Linq; public static class IsolatedStorageFileExtensions { /// <summary> /// Recursively gets a list of all files in isolated storage /// </summary> ///

Storing objects in IsolatedStorageSettings

早过忘川 提交于 2019-12-04 10:26:00
I have an object I want to store in the IsolatedStorageSettings, which I wan't to reuse when the application restarts. My problem lies in that the code I have written for some reason does not remember the object when trying to access the key upon restarting it. namespace MyNameSpace { public class WindowsPhoneSettings { private const string SelectedSiteKey = "SelectedSite"; private IsolatedStorageSettings isolatedStore = IsolatedStorageSettings.ApplicationSettings; private T RetrieveSetting<T>(string settingKey) { object settingValue; if (isolatedStore.TryGetValue(settingKey, out settingValue)