1

我在让 XForms 在 EPiServer 7 的一个块中工作时遇到了一些问题。它是 webforms 而不是 MVC。

当我将它们放在普通页面上时,XForms 可以工作,但是当我在块上使用它们时,我得到一个空异常。见下文。

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentNullException: Value cannot be null.
Parameter name: virtualPath

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[ArgumentNullException: Value cannot be null.
Parameter name: virtualPath]
System.Web.VirtualPath.Create(String virtualPath, VirtualPathOptions options) +11610798
EPiServer.Web.TemplateControlLoader.LoadControl(HttpContextBase httpContext, Type renderType, Object renderData, TemplateControl templateControl, String tag, Action`2 bindDataAction) +214
EPiServer.Web.TemplateControlLoader.LoadControl(HttpContextBase httpContext, IContentData contentData, TemplateControl templateControl, String tag) +223
EPiServer.Cms.Shell.MoveToPlatform.PersonalizationContentControlResolver.ResolveContentControls(ContentArea contentArea, Control parentControl, String tag, String itemCssClass, String itemTagName, Boolean enableEditFeatures) +870
EPiServer.Web.PropertyControls.PropertyContentAreaControl.GetContentRenderers(Boolean enableEditFeatures) +598
EPiServer.Web.PropertyControls.PropertyContentAreaControl.CreateContentAreaControls(Boolean enableEditFeatures) +130
EPiServer.Web.PropertyControls.PropertyDataControl.CreateChildControls() +103
System.Web.UI.Control.EnsureChildControls() +182
EPiServer.Web.WebControls.Property.CreateChildControls() +600
System.Web.UI.Control.EnsureChildControls() +182
System.Web.UI.Control.PreRenderRecursiveInternal() +60
System.Web.UI.Control.PreRenderRecursiveInternal() +222
System.Web.UI.Control.PreRenderRecursiveInternal() +222
System.Web.UI.Control.PreRenderRecursiveInternal() +222
System.Web.UI.Control.PreRenderRecursiveInternal() +222
System.Web.UI.Control.PreRenderRecursiveInternal() +222
System.Web.UI.Control.PreRenderRecursiveInternal() +222
System.Web.UI.Control.PreRenderRecursiveInternal() +222
System.Web.UI.Control.PreRenderRecursiveInternal() +222
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4201

我试图与合金模板进行比较,但没有发现应该像这样破坏它的区别。

我也尝试调试,但它不会在任何可以提供任何信息的断点处停止。

任何人都知道问题可能是什么?感谢您的帮助。

4

1 回答 1

1

我找到了解决这个问题的方法,但没有找到问题发生的原因。我的猜测是 Episerver 缓存了渲染器并尝试访问它不存在的旧版本。

解决方案是该块的渲染器似乎以某种方式损坏。我所做的是删除作为渲染器的 web 控件,进入编辑模式并得到错误“没有为块找到渲染器,然后再次创建它。

所以问题似乎不在于 xforms 模块。

于 2013-05-06T08:55:19.423 回答