首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > Windows Mobile >

调试异常:operation not permitted on isolatedstoragefilestream

2013-09-08 
调试错误:operation not permitted on isolatedstoragefilestream我的代码如下:System.IO.IsolatedStorage

调试错误: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的参数试试。

热点排行