Windows phone 8 IsolatedStorage权限错误

Windows phone 8 IsolatedStorage权限错误,windows-phone-8,Windows Phone 8,当我尝试运行此代码时,出现“不允许对IsolatedStorageFileStream执行操作”错误: using (var isf = IsolatedStorageFile.GetUserStoreForApplication()) { if (!isf.FileExists("Lokacije.abc")) isf.CreateFile("Lokacije.abc");

当我尝试运行此代码时,出现“不允许对IsolatedStorageFileStream执行操作”错误:

  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));
                    }
                }
            }
有人知道它可能是什么吗?
我没有在应用程序中的任何其他位置使用存储,因此它不可能已经在使用中。

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

有关更多信息,请参阅以下内容:

希望有帮助