System.FormatException:Guid应包含带4个破折号的32位数字-SiteCore

System.FormatException:Guid应包含带4个破折号的32位数字-SiteCore,sitecore,sitecore6,sitecore-media-library,Sitecore,Sitecore6,Sitecore Media Library,导致以下错误的原因是什么: 错误出现呈现错误:无法处理Xsl文件:abc.xslt(详细信息:System.FormatException:Guid应包含32位数字和4个破折号(xxxxxxxx-xxxx-xxxx-xxxx-XXXXXXXXXXXXXXXXXX) (供参考:使用Sitecore 6.4) 有人能帮我吗 编辑: 看起来像是权限问题。在我登录时工作正常,但因匿名而中断。 使用堆栈跟踪更新: [FormatException: Guid should contain 32 digit

导致以下错误的原因是什么:

错误出现呈现错误:无法处理Xsl文件:abc.xslt(详细信息:System.FormatException:Guid应包含32位数字和4个破折号(xxxxxxxx-xxxx-xxxx-xxxx-XXXXXXXXXXXXXXXXXX)

(供参考:使用Sitecore 6.4)

有人能帮我吗

编辑: 看起来像是权限问题。在我登录时工作正常,但因匿名而中断。 使用堆栈跟踪更新:

[FormatException: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).]
   System.Guid..ctor(String g) +2486
   Sitecore.Data.ID..ctor(String id) +65
   Sitecore.Data.ID.Parse(String value) +42
   Sitecore.SecurityModel.SecurityAssignments.LoadData() +240
   Sitecore.SecurityModel.SecurityField.get_Assignments() +194
   Sitecore.SecurityModel.SecurityField.GetRights(Domain domain, ID entityID) +139
   Sitecore.Shell.Web.UI.WebControls.SecurityTreeview.GetTreeNode(Item item, Control parent) +817
   Sitecore.Web.UI.HtmlControls.DataTreeview.Populate(DataContext dataContext, Control control, Item root, Item folder, String selectedIDs) +452
   Sitecore.Web.UI.HtmlControls.DataTreeview.Populate(DataContext dataContext, Control control, Item root, Item folder, String selectedIDs) +335
   Sitecore.Web.UI.HtmlControls.DataTreeview.Populate(Control control, DataContext dataContext) +440
   Sitecore.Web.UI.HtmlControls.DataTreeview.Populate(Control control, Int32 depth) +82
   Sitecore.Web.UI.HtmlControls.DataTreeview.OnLoad(EventArgs e) +758
   Sitecore.Shell.Web.UI.WebControls.SecurityTreeview.OnLoad(EventArgs e) +31
   System.Web.UI.Control.LoadRecursive() +50
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627

我最近出现了损坏的匿名配置文件-通过进入用户管理器并使用工具栏“重置”配置文件进行修复。可能会有所帮助


根据堆栈,我猜数据库中缺少分配给用户的一个角色组。

发生这种情况可能是因为您为此列设置了数据类型:System.Guid 让我们检查一下:

  • 打开数据源(在“工具”菜单中:数据/显示数据源)
  • 检查您的错误列,这将不同于其他
  • 打开服务器资源管理器(在“工具”菜单中:查看/服务器资源管理器,或 在解决方案资源管理器中双击数据库名称)
  • 找到您的数据库表,然后在鼠标右键单击上下文菜单“查找:”编辑表架构“
  • 在这里找到您的列更改数据类型属性,您需要哪些数据…单击确定…如果出现错误,请单击窗口左上角的刷新,然后单击确定
  • 在解决方案资源管理器中双击数据集,然后在出现的窗口中在列表中查找有问题的列
  • 单击列名并在properties Find DataType中,(我认为将在那里写入System.Guid)将其更改为您的数据类型。。。 重新编译项目并使用

  • 第二种也是最有效的方法是,检测哪个列具有System.Guid数据类型并将其删除,替换为其他…

    也许其中一些方法会激发您对检查/尝试内容的想法,即使它是不同的版本:

  • Sitecore 7.5(从7.2升级)
  • 在7.2中,我们添加了一个管道处理器,以允许在数据源位置字段(管道:Sitecore.Pipelines.GetRenderingDatasource.GetDatasourceLocation)中进行查询
  • 升级到7.5后,我们意识到Sitecore将此功能添加为7.5功能之一,因此出现了代码冲突,其中之一就是您在本文中显示的错误
  • 处理器的代码只希望guid作为数据源值,而不是字符串路径。一旦我们更新了代码,错误就消失了

  • 您有代码吗?看起来您正在为ID属性分配一个非ID值。这与所问的问题无关