IsolatedStoreExceptio:Unable to determine application identity of the caller
2011-08-02 21:32
585 查看
在winform或者控制台程序中使用下面代码时,会抛出IsolatedStoreExceptio:Unable to determine application identity of the caller
出现这个异常的原因是机器范围和应用范围内的独立存储只能在ClickOnce程序部署后使用。如果你的程序不是通过ClickOnce部署后执行的你就会看到“Unable to determine the application identity of the caller”.
使用下面代码可以正常执行:
using (var isolatedFile = IsolatedStorageFile.GetMachineStoreForApplication()) { } using (var isolatedFile = IsolatedStorageFile.GetUserStoreForApplication()) { }
出现这个异常的原因是机器范围和应用范围内的独立存储只能在ClickOnce程序部署后使用。如果你的程序不是通过ClickOnce部署后执行的你就会看到“Unable to determine the application identity of the caller”.
使用下面代码可以正常执行:
using (var isolatedFile = IsolatedStorageFile.GetUserStoreForAssembly()) { }
相关文章推荐
- Warning: Unable to determine the number of frames in this file
- 安装mysql时,报“unable to find a version of the runtime to run this application ”
- Interface builder was unable to determine the type of xxx.xib
- XP下运行VS2010生成程序报错:unable to find a version of the runtime to run this application
- iOS Interface builder was unable to determine the type of xxx.xib / xxx.storyboard
- Unable to determine if the owner (Domain\UserName) of job JOB_NAME has server access
- Linq------错误: Unable to determine the principal end of an association between the types
- Unable to find a version of the runtime to run this application.
- matlab:Warning: Unable to determine the number of frames in this file.
- Unable to find a version of the runtime to run this application.【matlab】
- Interface builder was unable to determine the type of xxx.xib
- Unable to find a version of the runtime to run this application解决方法
- Interface builder was unable to determine the type of xxx.xib
- unable to find a version of the runtime to run this application.
- iOS Interface builder was unable to determine the type of xxx.xib
- Unable to determine the principal end of an association between the types '***. The principal end of this association must be explicitly configured using either the relationship fluent API or data annotations.
- 安装mysql时,报“unable to find a version of the runtime to run this application ”
- 解决错误:unable to find a version of the runtime to run this application
- 黄聪:.Net Framework Initialization Error – Unable to find a version of the runtime to run this application解决方案
- XCode 4.3 Unable to load persistent store UserDictionary.sqlite 以及 ios simulator failed to install the application