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 least 2012 Update 4) where even after enabling the security settings it still throws this error. If this happens, close the project and delete the .csproj.user file and then reopen the project.
来源:https://stackoverflow.com/questions/5284622/isolatedstoragefile-exception