我在Sitefinity项目管理器中创建了新项目,新网站,在Visual Studio中打开它,开始调试。由于在提供登录后端之前没有创建任何页面。但是,当我点击登录而不是登录表单时,它给了我InvalidOperationException: Stack empty
例外
[InvalidOperationException: Stack empty.]
System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource) +52
System.Collections.Generic.Stack`1.Pop() +6667365
Microsoft.VisualStudio.Web.PageInspector.Runtime.WebForms.SelectionMappingRenderTraceListener.EndRendering(TextWriter writer, Object renderedObject) +152
System.Web.UI.RenderTraceListenerList.EndRendering(TextWriter writer, Object renderedObject) +58
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +142
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1386
如果在从Sitefinity项目管理器运行项目之前我能够成功登录到后端之前,在Visual Studio中打开项目后,它会一次又一次地给我错误,即使我试图从项目管理器运行它。登录后端的唯一方法是在Visual Studio中关闭项目。
答案 0 :(得分:3)
似乎错误与此处描述的相同:InvalidOperationException: Stack empty
有两种方法可以解决它。在Web.config中设置
<appSettings>
<add key="PageInspector:ServerCodeMappingSupport" value="Disabled" />
</appSettings>
或
<appSettings>
<add key="vs:EnableBrowserLink" value="false"/>
</appSettings>
都为我工作。
此处描述了相同解决方案的类似问题http://www.sitefinity.com/developer-network/knowledge-base/details/create-product-value-cannot-be-null-exception-when-the-project-is-included-into-an-empty-solution-in-visual-studio-2013 但错误有“值不能为空”。