Sitecore 9.0 - 编辑个性化规则时出错 - 元素为空

Sitecore 9.0 - Error when editing personalization rule - element is null

当我尝试编辑组件上的个性化规则时,出现以下错误:

在我浏览器的网络选项卡中,我可以看到正在向以下 URL:

发出请求
/sitecore/shell/-/xaml/Sitecore.Shell.Applications.Rules.RulesEditor.aspx?hdl=584EB7FC4C5D4AD6A9A21EED4F48D2AA

响应是一个 YSOD,其中包含以下堆栈跟踪:

[InvalidOperationException: element is null]
   Sitecore.Shell.Applications.Rules.RulesEditor.RulesEditorPage.Edit(String uid, String name, String control, String parameters) +727

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0
   System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) +160
   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +101
   Sitecore.Web.UI.XamlSharp.Xaml.XamlControl.ExecuteAjaxMethod(AjaxMethodEventArgs e) +72
   Sitecore.Web.UI.XamlSharp.Xaml.XamlControl.Sitecore.Web.UI.XamlSharp.Ajax.IIsAjaxEventHandler.HandleMethodEvent(AjaxMethodEventArgs e) +33
   Sitecore.Web.UI.WebControls.AjaxScriptManager.DispatchMethod(Control control, String parameters) +319
   Sitecore.Web.UI.WebControls.AjaxScriptManager.Dispatch(String clientId, String parameters) +303
   Sitecore.Web.UI.XamlSharp.Ajax.AjaxContinuationProcessor.Invoke(PipelineArgs args) +370
   Sitecore.Nexus.Pipelines.NexusPipelineApi.Resume(PipelineArgs args, Pipeline pipeline) +225
   Sitecore.Pipelines.Pipeline.Resume() +38
   Sitecore.Pipelines.Pipeline.DoStart(PipelineArgs args) +115
   Sitecore.Pipelines.Pipeline.Start(PipelineArgs args, Boolean atomic) +169
   Sitecore.Web.UI.WebControls.ContinuationManager.RunPipelines() +306
   Sitecore.Web.UI.WebControls.ContinuationManager.OnPreRender(EventArgs e) +307
   System.Web.UI.Control.PreRenderRecursiveInternal() +88
   System.Web.UI.Control.PreRenderRecursiveInternal() +160
   System.Web.UI.Control.PreRenderRecursiveInternal() +160
   System.Web.UI.Control.PreRenderRecursiveInternal() +160
   System.Web.UI.Control.PreRenderRecursiveInternal() +160
   System.Web.UI.Control.PreRenderRecursiveInternal() +160
   System.Web.UI.Control.PreRenderRecursiveInternal() +160
   System.Web.UI.Control.PreRenderRecursiveInternal() +160
   System.Web.UI.Control.PreRenderRecursiveInternal() +160
   System.Web.UI.Control.PreRenderRecursiveInternal() +160
   System.Web.UI.Control.PreRenderRecursiveInternal() +160
   System.Web.UI.Control.PreRenderRecursiveInternal() +160
   System.Web.UI.Control.PreRenderRecursiveInternal() +160
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +883

发生错误时,以下消息将写入 Sitecore 日志:

2019-05-10T09:22:48  PID[8228] Error       8816 09:22:48 ERROR Application error.Exception: System.Web.HttpUnhandledExceptionMessage: Exception of type 'System.Web.HttpUnhandledException' was thrown.Source: System.Webat System.Web.UI.Page.HandleError(Exception e)at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)at System.Web.UI.Page.ProcessRequest()at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)at System.Web.UI.Page.ProcessRequest(HttpContext context)at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)Nested ExceptionException: System.Reflection.TargetInvocationExceptionMessage: Exception has been thrown by the target of an invocation.Source: mscorlibat System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)at Sitecore.Web.UI.XamlSharp.Xaml.XamlControl.ExecuteAjaxMethod(AjaxMethodEventArgs e)at Sitecore.Web.UI.XamlSharp.Xaml.XamlControl.Sitecore.Web.UI.XamlSharp.Ajax.IIsAjaxEventHandler.HandleMethodEvent(AjaxMethodEventArgs e)at Sitecore.Web.UI.WebControls.AjaxScriptManager.DispatchMethod(Control control, String parameters)at Sitecore.Web.UI.WebControls.AjaxScriptManager.Dispatch(String clientId, String parameters)at Sitecore.Web.UI.XamlSharp.Ajax.AjaxContinuationProcessor.Invoke(PipelineArgs args)at Sitecore.Nexus.Pipelines.NexusPipelineApi.Resume(PipelineArgs args, Pipeline pipeline)at Sitecore.Pipelines.Pipeline.Resume()at Sitecore.Pipelines.Pipeline.DoStart(PipelineArgs args)at Sitecore.Pipelines.Pipeline.Start(PipelineArgs args, Boolean atomic)at Sitecore.Web.UI.WebControls.ContinuationManager.RunPipelines()at Sitecore.Web.UI.WebControls.ContinuationManager.OnPreRender(EventArgs e)at System.Web.UI.Control.PreRenderRecursiveInternal()at System.Web.UI.Control.PreRenderRecursiveInternal()at System.Web.UI.Control.PreRenderRecursiveInternal()at System.Web.UI.Control.PreRenderRecursiveInternal()at System.Web.UI.Control.PreRenderRecursiveInternal()at System.Web.UI.Control.PreRenderRecursiveInternal()at System.Web.UI.Control.PreRenderRecursiveInternal()at System.Web.UI.Control.PreRenderRecursiveInternal()at System.Web.UI.Control.PreRenderRecursiveInternal()at System.Web.UI.Control.PreRenderRecursiveInternal()at System.Web.UI.Control.PreRenderRecursiveInternal()at System.Web.UI.Control.PreRenderRecursiveInternal()at System.Web.UI.Control.PreRenderRecursiveInternal()at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)Nested ExceptionException: System.InvalidOperationExceptionMessage: element is nullSource: Sitecore.Clientat Sitecore.Shell.Applications.Rules.RulesEditor.RulesEditorPage.Edit(String uid, String name, String control, String parameters)

我们正在使用 Sitecore.NET 9.0.0(修订版 171002),运行 作为 Azure 应用服务。

有什么想法吗?

所以,问题出在服务器上缺少 "App_Browsers" 文件夹。我替换了这个文件夹,重新启动了网络应用程序,问题似乎已解决。