質問

I am new on ASP.NET and just been assigned to create an installer for company's CMS(content management system) web application (written in c#.net).

It is working fine when using Xcopy development to any customer's sever. However, after I create an .msi installer in VS2010 and installed the application, some of the web form inside can not be displayed with the following exception:


Server Error in '/cms-vodoke' Application.

Object reference not set to an instance of an object.

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. 

Exception Details:

System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

[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 

Stack Trace:

[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) +5273

The web setup project was built fine, and installed without any problem, but the application just not working, even on my local machine. I've be tripped by this for several days,

Can anyone help me to identify where is this problem coming from? Thanks a lot.

役に立ちましたか?

解決

Please go to the server that the application is deployed to and look at the windows event log. You should be able to see detailed event log there. Please paste the one related to your application so that we can see what's going on.

他のヒント

That is no line where it would be shown what the error is and why it is getting thrown. Since there is no line of code to read, it would be hard for me too to get to the root of the error.

General talking, this exception is thrown when you're trying to reference a null value or when the object type is not what was being expected at the stage. It might be an error in the dependencies that you're working on or the Assembly files that you're having for this application to work.

Is the page empty? What is the code in there that might be throwing this error?

http://msdn.microsoft.com/en-us/library/system.nullreferenceexception(v=vs.110).aspx Go here and read the Exception information.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top