我是ASP.NET的新手,刚刚被指派为公司的CMS(内容管理系统) web应用程序(用c#.net编写)创建一个安装程序。
当对任何客户的服务器使用Xcopy开发时,它工作得很好。但是,在我在.msi中创建了一个VS2010安装程序并安装了应用程序之后,除了以下例外,无法显示其中的一些web表单:
'/cms-vodoke'应用程序中的服务器错误。
对象引用未设置为对象的实例。
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 例外细节:
System.NullReferenceException: Object reference not set to an instance of an object.源错误:
[No relevant source lines]
Source File: c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\cms-vodoke\9f7fc69b\77cb7e4\App_Web_nlj0wmz0.7.cs Line: 0 堆栈跟踪:
[NullReferenceException: Object reference not set to an instance of an object.]
CuteEditor.Impl.b..ctor(Type type, String key) +77
CuteEditor.a.i(HtmlTextWriter A_0) +156
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +11249515
ASP.cmscontrol_cm_rteditor_catwallpaper_ascx.__RenderuiRTEditor(HtmlTextWriter __w, Control parameterContainer) in c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\cms-vodoke\9f7fc69b\77cb7e4\App_Web_nlj0wmz0.7.cs:0
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +130
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +11249515
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +245
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +11249515
ASP.cmsadmin_cm_category_form_aspx.__RenderpgContent1(HtmlTextWriter __w, Control parameterContainer) in c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\cms-vodoke\9f7fc69b\77cb7e4\App_Web_xq4tbmg1.0.cs:0
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +130
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +11249515
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +245
System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +314
System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +47
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +11249515
ASP.cmsadmin_system_master.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in c:\inetpub\wwwroot\cms-vodoke\cmsadmin\system.master:28
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +130
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +11249515
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +245
System.Web.UI.Page.Render(HtmlTextWriter writer) +39
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +11249515
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5273web安装项目构建良好,安装没有任何问题,但应用程序只是无法工作,甚至在我的本地机器上。我被这个绊倒好几天了,
有人能帮我找出这个问题的来源吗?非常感谢。
发布于 2014-01-12 16:26:32
请转到应用程序部署到的服务器,并查看windows事件日志。您应该能够在那里看到详细的事件日志。请粘贴与您的应用程序相关的,以便我们可以看到发生了什么。
发布于 2014-01-12 16:08:20
这不是要显示错误是什么以及抛出错误的原因的行。因为没有代码可读,所以我也很难找到错误的根源。
一般来说,当您试图引用空值时,或者当对象类型不是预期的时候,就会引发此异常。它可能是您正在处理的依赖项中的一个错误,也可能是您要使用的程序集文件中的一个错误。
这页是空的吗?里面有什么代码可能会抛出这个错误?
http://msdn.microsoft.com/en-us/library/system.nullreferenceexception(v=vs.110).aspx到这里阅读异常信息。
https://stackoverflow.com/questions/21076650
复制相似问题