IsolatedStorageFile exception

余生长醉 提交于 2019-12-22 10:15:24

问题


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?


回答1:


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!