ViewEngineResult

  • 59 Views
  • Last Post 25 March 2017
  • Topic Is Solved
joshyates1980 posted this 22 March 2017

I commented out multiple admin section and did not touch the controller.  That broke the application. Would this have made a database entry in the settings and broke the application?  On startup, now I'm getting 

Object reference not set to an instance of an object.

Line 82:         public ViewEngineResult FindView(ControllerContext controllerContext, string viewName, string masterName, bool useCache)
Line 83:         {
Line 84:             return CreateRealViewEngine().FindView(controllerContext, viewName, masterName, useCache);
Line 85:         }
Line 86: 

Order By: Standard | Newest | Votes
YodasMyDad posted this 23 March 2017

Hmmm that's very weird. This is just the view engine looking for views. It's a standard ASP.NET MVC thing, so not sure why that's YSOD'ing. Maybe viewName is null.

joshyates1980 posted this 25 March 2017

viewName is not null.   For home/index, the parameters, viewName = "Index"  masterName = "" and usesCache = true.

 

I'm going to back step through uncomment the code on the views.  The only required field I commented out was the theme accordion.

 

 

Update: The issue was theme can not be null in the settings table.  I broke the application when I commented the theme dropdown out in the admin section.  I manually added "Metro" back into the Settings table in the database and now the application is working again.

Close