Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Simon 15 posts 85 karma points
    Mar 06, 2017 @ 09:00
    Simon
    0

    Object reference not set to an instance of an object after change in Content

    Hi all

    I have a content editor who made a change in Umbraco backoffice about how a link should open. She published the page and our entire website goes down with a Object reference not set to an instance of an object.

    Can anybody see what the problem is? Notting in our code is changed.

    [NullReferenceException: Object reference not set to an instance of an object.]
       IKAS.Mainsite.Website.Controllers.MasterController.View(MasterViewModel model) +3757
       lambda_method(Closure , ControllerBase , Object[] ) +104
       System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +264
       System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +34
       System.Web.Mvc.Async.<>c__DisplayClass42.<BeginInvokeSynchronousActionMethod>b__41() +33
       System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) +59
       System.Web.Mvc.Async.<>c__DisplayClass39.<BeginInvokeActionMethodWithFilters>b__33() +76
       System.Web.Mvc.Async.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49() +371
       System.Web.Mvc.Async.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49() +371
       System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult) +60
       System.Web.Mvc.Async.<>c__DisplayClass2a.<BeginInvokeAction>b__20() +32
       System.Web.Mvc.Async.<>c__DisplayClass25.<BeginInvokeAction>b__22(IAsyncResult asyncResult) +185
       System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +53
       System.Web.Mvc.<>c__DisplayClass1d.<BeginExecuteCore>b__18(IAsyncResult asyncResult) +24
       System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +22
       System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +68
       System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +22
       System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +53
       System.Web.Mvc.<>c__DisplayClass8.<BeginProcessRequest>b__3(IAsyncResult asyncResult) +39
       System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +22
       System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +53
       System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +399
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +137
    
  • Dennis Adolfi 1082 posts 6449 karma points MVP 6x c-trib
    Mar 06, 2017 @ 09:09
    Dennis Adolfi
    0

    Spontaneously, it feels like you're missing a nullcheck somewhere in the code. It can be anything but from the looks of your error message I would start looking in your MasterController for any code statements where you might use lambda Where(), First(), Last() etc and make sure you add null checks (if's) to prevent the infamous "Object reference not set to an instance of an object" error.

  • Stefano 61 posts 313 karma points c-trib
    Mar 06, 2017 @ 09:13
    Stefano
    0

    Try to look in MasterController.View(MasterViewModel model) for something that is missing a null check.

Please Sign in or register to post replies

Write your reply to:

Draft