Windows phone 8 尝试在windows phone应用程序中创建目录时获取IsolatedStorageException

Windows phone 8 尝试在windows phone应用程序中创建目录时获取IsolatedStorageException,windows-phone-8,windows-phone,isolatedstorage,isolatedstoragefile,Windows Phone 8,Windows Phone,Isolatedstorage,Isolatedstoragefile,这是我的密码 var storage=IsolatedStorageFile.GetUserStoreForApplication; 如果directoryPath.StartsWith/ directoryPath=/+directoryPath; 如果storage.DirectoryExistsdirectoryPath { storage.CreateDirectorydirectoryPath; } 当我调用此方法时,有时会出现以下异常 [Type]:[IsolatedStorageE

这是我的密码

var storage=IsolatedStorageFile.GetUserStoreForApplication; 如果directoryPath.StartsWith/ directoryPath=/+directoryPath; 如果storage.DirectoryExistsdirectoryPath { storage.CreateDirectorydirectoryPath; } 当我调用此方法时,有时会出现以下异常

[Type]:[IsolatedStorageException]    
[ExceptionMessage]:[Unable to create directory.]
我不知道为什么我会得到这个例外。我的代码有问题吗?很多次它都很好,但有时我会有例外


请让我知道我的代码有什么问题

我收到了这个错误消息。事实证明,我使用的是完整的目录路径,而我本应该只使用文件夹名


在我将其更改为最后一个文件夹名称后,它停止抛出此异常。

为什么添加斜杠/?它只是用于指定目录路径。即使删除斜杠,我也面临同样的问题。