【问题标题】:Path Too Long Error when importing into Sensenet导入 Sensenet 时出现路径过长错误
【发布时间】:2021-05-27 14:39:59
【问题描述】:

我也在尝试将一些内容导入 Sensenet,但它会引发以下错误:

14:12:12.4025   ========== Exception:
14:12:12.4155   Path: C:\Users\Administrator\source\repos\WebApplication6\WebApplication6\Admin\tools\import_legacy_content\content\workspaces2\IPA2013\Framework Workspaces\13SER01_2f15_2f71\ExAnteReviewList\ExAnteReview\Transmission_5fNote_5f1_5ffor_5fDIS_5f13SER01_5f14_5f71_5focr.pdf.Content
14:12:12.4315   ApplicationException: Cannot create a ContentInfo. Path: C:\Users\Administrator\source\repos\WebApplication6\WebApplication6\Admin\tools\import_legacy_content\content\workspaces2\IPA2013\Framework Workspaces\13SER01_2f15_2f71\ExAnteReviewList\ExAnteReview\Transmission_5fNote_5f1_5ffor_5fDIS_5f13SER01_5f14_5f71_5focr.pdf.Content
14:12:12.5955      at SenseNet.Packaging.Steps.ImportBase.ContentInfo..ctor(String path, Node parent)
   at SenseNet.Packaging.Steps.ImportBase.ImporterClass.TreeWalker(String path, Boolean pathIsFile, Node folder, String indent, Boolean aspects, Boolean settings)
14:12:12.6115   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 less than 248 characters.
14:12:12.6625      at System.IO.Path.NewNormalizePathLimitedChecks(String path, Int32 maxPathLength, Boolean expandShortPaths)
   at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
   at System.IO.Path.InternalGetDirectoryName(String path)
   at SenseNet.Packaging.Steps.ImportBase.ContentInfo..ctor(String path, Node parent)
14:12:12.6885   =====================

我对注册表和组策略进行了更改以启用对长文件名的支持,但错误仍然出现。 我是否需要更改某些 Sensenet 配置文件才能使其正常工作?

谢谢

【问题讨论】:

    标签: sensenet


    【解决方案1】:

    Windows 对文件路径有 256 个字符的限制,并且不会超过这个限制。通过更新,Windows 10 消除了这个限制,但不能保证像 snadmin 这样的旧软件可以使用它。见Maximum Path Length Limitation

    另一种缩短工具入口点的解决方法,例如从

    C:\Users\Administrator\source\repos\WebApplication6\WebApplication6\Admin\tools\import_legacy_content\content\workspaces2\IPA2013\Framework Workspaces\13SER01_2f15_2f71\ExAnteReviewList\ExAnteReview\Transmission_5fNote_5f1_5ffor_5fDIS_5f13SER01_5f14_5f71_5focr.pdf.Content

    C:\tools\import_legacy_content\content\workspaces2\IPA2013\Framework Workspaces\13SER01_2f15_2f71\ExAnteReviewList\ExAnteReview\Transmission_5fNote_5f1_5ffor_5fDIS_5f13SER01_5f14_5f71_5focr.pdf.Content

    要实现这个相对或绝对路径可以用snadmin,见Arguments

    对于上面的例子,我假设它会是这样的:

    SnAdmin.exe 'C:\tools\import_legacy_content.zip'

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-11-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多