我在生产服务器上托管了一个asp.net网站。
我在生成服务器上呈现控件时发生了asp.net错误。
此错误的堆栈跟踪是:
>'/'应用程序中的服务器错误。 你调用的对象是空的。 描述:执行当前Web请求期间发生未处理的异常。请查看堆栈跟踪,以获取有关错误及其在代码中的起源位置的更多信息。Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
来源错误:
在执行当前Web请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪来识别有关异常的起源和位置的信息。
堆栈追踪:
[NullReferenceException: Object reference not set to an instance of an object.]
ASP.tribute_home_aspx.__RenderYTAnnouncement(HtmlTextWriter __w, Control parameterContainer) +44
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +256
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +32
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
ASP.tribute_home_aspx.__RenderForm1(HtmlTextWriter __w, Control parameterContainer) +62
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +256
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +163
System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +32
System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +51
System.Web.UI.Adapters.ControlAdapter.Render(HtmlTextWriter writer) +21
FormRewriterControlAdapter.Render(HtmlTextWriter writer) +39
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +8685321
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +40
ASP.tribute_home_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) +851
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +256
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
System.Web.UI.Page.Render(HtmlTextWriter writer) +29
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1266
我已经完全测试了我的代码但是我找不到任何错误,因为相同的代码在登台服务器上运行正常。
我觉得这是一个错误,与生产服务器上的虚拟目录配置或asp.net配置相关联。
请帮助摆脱这个错误,因为它已经浪费了很多时间。
预先感谢,
答案 0 :(得分:0)
我可能听起来多余。但请检查您是否拥有部署的ascx和/或aspx文件的最新版本。