我的应用程序运行正常但突然停止工作并发出此错误 [InvalidOperationException:Stack empty。] System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)+52 System.Collections.Generic.Stack`1.Pop()+ 6694385 Microsoft.VisualStudio.Web.PageInspector.Runtime.WebForms.SelectionMappingRenderTraceListener.EndRendering(TextWriter writer,Object renderedObject)+84 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
答案 0 :(得分:22)
我有同样的问题,但现在修好了。首先我禁用了PageInspector。
<&的appSettings GT;
< add key =“PageInspector:ServerCodeMappingSupport”value =“Disabled”/>
< /&的appSettings GT;
之后我得到了另一个与ResolveUrl方法有关的错误,我删除了方法并解决了问题,瞧!它的工作完美。最后,我通过删除以前的设置启用了PageInspector,但仍然有效。
答案 1 :(得分:0)
对我来说,这是 Brower链接。禁用它对我有用。有关更多参考,请查看https://docs.microsoft.com/en-us/aspnet/visual-studio/overview/2013/using-browser-link