当前位置: 代码迷 >> Windows Mobile >> 调试异常:operation not permitted on isolatedstoragefilestream
  详细解决方案

调试异常:operation not permitted on isolatedstoragefilestream

热度:157   发布时间:2016-04-25 07:21:49.0
调试错误:operation not permitted on isolatedstoragefilestream
我的代码如下:
            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看,文件确实没有,
这是怎么回事呢?是因为没有权限打开文件么?

------解决方案--------------------
应该是没有创建吧,用createoropen的参数试试。
  相关解决方案