这是一个美丽的一天,我走进工作和Sitecore的随机给了我这样的:
[NullReferenceException: Object reference not set to an instance of an object.]
Sitecore.UIUtil.GetBrowserClassString() +491
Sitecore.sitecore.login.LoginPage.AddBrowserAttributes() +134
Sitecore.sitecore.login.LoginPage.OnPreRender(EventArgs e) +434
System.Web.UI.Control.PreRenderRecursiveInternal() +112
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4296
这不仅是一个中断表示一天,那是完全无章可循。 它不会出现,我或者我的团队所做的任何影响的变化,它一直工作正常。
有任何想法吗?
我们有这个问题,使用Sitecore的6.5多站点Sitecore的实例。 问题是,作为@WeekendWarrior提到的Capabitilities
类型为null
。 我发现了解决Sitecore的论坛 ; 但是,我认为这会是有用这里复制发布答案的简单,速战速决的一部分,因为你需要一个Sitecore的帐户来访问论坛:
在您的默认网站内容编辑器,定位/sitecore/layout/Devices/Default
,并在该领域Capabilities Type - Type, Assembly
请输入:
Sitecore.Web.Configuration.InternetExplorerCapabilities,Sitecore.Kernel
保存,然后发布该项目。
挖掘到GetBrowserClassString()与反射器(Sitecore.Kernel.dll),唯一可能的LOC可能触发空引用的错误是:
Client.Device.Capabilities.Browser.MajorVersion // in the Sitecore namespace
你有没有改变你的用户代理字符串的插件吗? 这可能会令这行代码。 无论如何,我建议你把你的解决方案这行代码(或其他测试Sitecore的解决方案,进行调试,看看它的一部分是空的。