开发者

WPF. IsolatedStoreage FileName Length

For save my configuration_data I use isolated stoeage domain scope like:

 IsolatedStorageFile isoFile =
    IsolatedStorageFile.GetUserStoreForDomain();

But sometimes at saving data I get:

   System.Reflection.TargetInvocationException: Exception has been thrown by the  
   target of an invocation. ---> System.IO.PathTooLongException: The specified path,
   file name, or both are too long. The fully qualified file name must be less than 
   260 characters, and the directory name must be开发者_StackOverflow社区 less than 248 characters.
   at System.IO.PathHelper.Append(Char value)
   at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength)

Ok my fileName is too long. But I can't control it. Also I can't use application scope, cause I don't use ClickOnce.

So what should I do? Thanks


This is a known issue with IsolatedStorage.

You could use the user profile (AppData) to store your information as apposed to the IsolatedStorage API.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜