首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >IsolatedStorage权限错误

IsolatedStorage权限错误
EN

Stack Overflow用户
提问于 2014-07-05 10:35:56
回答 1查看 27关注 0票数 0

当我试图运行以下代码时,我会得到一个“IsolatedStorageFileStream上不允许的操作”错误:

代码语言:javascript
复制
  using (var isf = IsolatedStorageFile.GetUserStoreForApplication())
            {

                if (!isf.FileExists("Lokacije.abc"))
                    isf.CreateFile("Lokacije.abc");

                using (var stream = new IsolatedStorageFileStream("Lokacije.abc", FileMode.Append, FileAccess.ReadWrite, isf))
                {
                    using (var sw = new StreamWriter(stream))
                    {
                        sw.Write(string.Format("GC-X({0})-Y({1})|", x, y));
                    }
                }
            }

有人知道会是什么吗?我没有在我的应用程序中的任何其他地方使用存储,所以它不可能已经在使用。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-07-05 16:50:07

检查是否有两个线程同时访问IsolatedStorage (即。在VS Debug.View.Threads中,并验证在发生异常时,通过相同的IsoStore代码没有多条路径)。

欲了解更多情况,请参考以下内容:

http://social.msdn.microsoft.com/Forums/wpapps/en-US/a1bb0b15-6bc0-4c63-ac94-ec1e63242cf1/operation-not-permitted-on-isolatedstoragefilestream?forum=wpdevelop

Operation not permitted on IsolatedStorageFileStream error

希望能帮上忙!

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/24585513

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档