我尝试在IIS中启动一个网站,得到这个错误。我不知道是什么原因,因为这个网站是由另一个人创建的,不是我。
堆栈跟踪:
`System.Collections.Generic.Dictionary`2.FindEntry(TKey key) +14370237
System.Collections.Generic.Dictionary`2.TryGetValue(TKey key, TValue& value) +20
Microsoft.VisualStudio.Web.PageInspector.Runtime.WebForms.SelectionMappingRenderTraceListener.GetLiteralTraceData(LiteralControl literal, TraceData& data) +71
Microsoft.VisualStudio.Web.PageInspector.Runtime.WebForms.SelectionMappingRenderTraceListener.GetTraceData(Object renderedObject) +220
Microsoft.VisualStudio.Web.PageInspector.Runtime.WebForms.SelectionMappingRenderTraceListener.EndRendering(TextWriter writer, Object renderedObject) +47
System.Web.UI.RenderTraceListenerList.EndRendering(TextWriter writer, Object renderedObject) +90
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +12372803
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +150
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +150
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246
System.Web.UI.UpdatePanel.RenderChildren(HtmlTextWriter writer) +331
System.Web.UI.UpdatePanel.Render(HtmlTextWriter writer) +114
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +150
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246
System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +151
System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +49
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +150
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +150
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246
System.Web.UI.Page.Render(HtmlTextWriter writer) +40
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +150
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5363`
字符串
3条答案
按热度按时间cbeh67ev1#
如果您的服务器控件过期或版本较旧,PageInspector通常会起作用。如果您使用的是外部ASP.NET服务器控件,请尝试升级它们。
如果你有一个合适的解决方法,那么你可以禁用页面检查器,如下所示:
字符串
vltsax252#
有一个类似的问题,虽然@raja nadar的回答为我解决了这个问题,但这并不是真正的原因(或者说是真正的解决办法)。
问题是:
字符串
添加
型
踢它到一个完整的重新编译,其中切换假/真修复了同事机器上的问题。
似乎我修改了一些东西,而不是在根没有触发重新编译相关的DLL的。
ve7v8dk23#
我在VS2017社区版中也遇到了同样的问题。下面是观察,Above post对我来说非常有用。它只发生在,当你的Visual Studio更新时,(https://blogs.msdn.microsoft.com/davidebb/2009/04/15/a-new-flag-to-optimize-asp-net-compilation-behavior/)要打开这个开关,将其添加到你的编译部分:
字符串
或添加
型
如上述职位