【发布时间】:2013-12-22 18:39:03
【问题描述】:
在运行 Visual Studio 2013 中构建的 ASP.NET 4.x 应用程序后,我得到以下异常。
我已尝试通过删除页面检查器程序集来禁用 PageInspector
<assemblies>
<remove assembly="Microsoft.VisualStudio.Web.PageInspector.Loader, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
</assemblies>
并将此配置添加到应用设置
<appSettings>
<add key="PageInspector:ServerCodeMappingSupport" value="Disabled"/>
</appSettings>
没有任何帮助。
[/Pages/TargetPage.aspx] System.Web.HttpException (0x80004005): Exception of type 'System.Web.HttpException' was thrown. ---> System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.InvalidOperationException: Stack empty.
at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
at System.Collections.Generic.Stack`1.Pop()
at Microsoft.VisualStudio.Web.PageInspector.Runtime.WebForms.SelectionMappingRenderTraceListener.EndRendering(TextWriter writer, Object renderedObject)
at System.Web.UI.RenderTraceListener.RenderTraceListenerList.EndRendering(TextWriter writer, Object renderedObject)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at 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.LegacyPageAsyncInfo.<CallHandlersPossiblyUnderLock>b__32(Object o)
at System.Web.HttpContext.InvokeCancellableCallback(WaitCallback callback, Object state)
at System.Web.UI.Page.LegacyPageAsyncInfo.CallHandlersPossiblyUnderLock(Boolean onPageThread)
at System.Web.UI.Page.LegacyPageAsyncInfo.CallHandlers(Boolean onPageThread)
at System.Web.HttpAsyncResult.End()
at System.Web.UI.Page.LegacyAsyncPageEndProcessRequest(IAsyncResult result)
at System.Web.UI.Page.AsyncPageEndProcessRequest(IAsyncResult result)
有什么方法可以避免异常吗? 非常感谢您的任何建议
【问题讨论】:
标签: asp.net asp.net-4.0 visual-studio-2013