调试错误:operation not permitted on isolatedstoragefilestream

llzhe 2013-08-30 05:28:14
我的代码如下:
System.IO.IsolatedStorage.IsolatedStorageFile store = System.IO.IsolatedStorage.IsolatedStorageFile.GetUserStoreForApplication();
store.CreateDirectory(this.m_cacheFilePath);
System.IO.IsolatedStorage.IsolatedStorageFileStream file = new System.IO.IsolatedStorage.IsolatedStorageFileStream(this.m_cacheFilePath + "\\a.cfg", System.IO.FileMode.Open, store);

用ise看,this.m_cacheFilePath这个目录已经创建成功,但是执行到System.IO.IsolatedStorage.IsolatedStorageFileStream file = new System.IO.IsolatedStorage.IsolatedStorageFileStream(this.m_cacheFilePath + "\\a.cfg", System.IO.FileMode.Open, store);这里时报异常:operation not permitted on isolatedstoragefilestream


---------------------------------------------------------------------------------------------

用ise看,文件确实没有,
这是怎么回事呢?是因为没有权限打开文件么?
...全文
318 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
kfq 2013-09-06
  • 打赏
  • 举报
回复
应该是没有创建吧,用createoropen的参数试试。
gnimgnot 2013-09-01
  • 打赏
  • 举报
回复
错误的意思是说没权限。
#blackheart 2013-08-30
  • 打赏
  • 举报
回复
System.IO.FileMode.Open 文件都没创建你就想打开?

7,657

社区成员

发帖
与我相关
我的任务
社区描述
Windows Phone是微软发布的一款手机操作系统,它将微软旗下的Xbox LIVE游戏、Zune音乐与独特的视频体验整合至手机中。
社区管理员
  • Windows客户端开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧