This project is read-only.

cannot build

Nov 15, 2010 at 1:11 PM

Hi there,

I've been trying to build the project but haven't been successful.

I got crashed:

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: 

Line 2:  
Line 3:  <div class="openforum_container">
Line 4:      <%= (Model.IncludeDefaultStyles) ? ForumViewHelper.GetDefaultStyles() : ""%>
Line 5:      <%= (Model.IncludeValidationSummary) ? Html.ValidationSummary().ToString() : ""%>
Line 6:      


Source File: c:\....\Index.ascx    Line: 

Stack Trace: 

[NullReferenceException: Object reference not set to an instance of an object.]
   ASP.views_forum_index_ascx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in c:\.....OpenForum.Views.Compiled\Source\Views\Forum\Index.ascx:4
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +256
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
   System.Web.UI.Control.Render(HtmlTextWriter writer) +10
   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.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +134
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
   System.Web.UI.Page.Render(HtmlTextWriter writer) +29
   System.Web.Mvc.ViewPage.Render(HtmlTextWriter writer) +59
   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

 

any one has any clue?

Coordinator
Nov 15, 2010 at 2:53 PM

Hi jony,

I looks like your Model is null. What does your controller code look like?

Nov 15, 2010 at 7:00 PM

Hi herbrandson,

My Model is not null

Model

* Current Page = 0

* IncludeDetaulStyles = true

* IncludeValidatinSummary = true

* Message="There are currenlty no post in this .."

* Page Title = "Forum

* Posts="{select top (20) [ t0]....

* SearchQuery = null

* TotalPages = 0

 

any other clue?

Nov 15, 2010 at 7:02 PM

My controller is exactly as per the download. I'm running Samples/Simple project.

Do you know if there's download available that is working  for latest MVC and also VS2010?

 

Nov 15, 2010 at 7:08 PM

I took out some code and now it crahsed on empty line

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: 

Line 2:  
Line 3:  <div class="openforum_container">
Line 4:      
Line 5:  
Line 6:      


Source File: c:\..............\Views\Forum\Index.ascx    Line: 

Stack Trace: 

[NullReferenceException: Object reference not set to an instance of an object.]
   ASP.views_forum_index_ascx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in c:\...........\OpenForum.Views.Compiled\Source\Views\Forum\Index.ascx:4
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +256
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
   System.Web.UI.Control.Render(HtmlTextWriter writer) +10
   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.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +134
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
   System.Web.UI.Page.Render(HtmlTextWriter writer) +29
   System.Web.Mvc.ViewPage.Render(HtmlTextWriter writer) +59
   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

this is getting really weird -)

Coordinator
Nov 16, 2010 at 4:24 AM

Wow, that's really crazy! What version of MVC are you using?