Copied to clipboard

Flag this post as spam?

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


  • Susanne Hou 3 posts 73 karma points
    Mar 01, 2021 @ 13:21
    Susanne Hou
    0

    Object reference not set to an instance of an object in ContainerControllerFactory.GetControllerInstance

    I have a solution where I have added a new page. When I click the button to open that page, I get the error shown in the screenshot below.

    I ahve added pages before and never had this problem. I've compared the new page and controllers to the previous ones I made and everything looks good, altough I will admit I might have stared myself blind on it by now.

    In any case, does anyone know what this error might suggest is the problem? I feel like it could be something about the registration of the dependency injection, but none of my other pages or controllers seem to be registered anywhere.

    enter image description here

  • Alex Skrypnyk 5908 posts 22603 karma points MVP 4x admin c-trib
    Mar 02, 2021 @ 20:46
    Alex Skrypnyk
    0

    Hi Susanne

    Can you check the log? Have a look at /app_data/Logs Or Log viewer in Umbraco back-office.

    Thanks,

    Alex

  • Susanne Hou 3 posts 73 karma points
    Mar 03, 2021 @ 19:45
    Susanne Hou
    0

    I had a look in the log and noticed Umbraco seemed to be looking for a controller with a different name than I expected - turns out I had misspelled the folder name I put the controller in. I believe a 'doh' is in order 😂

    Thank you for the tip about the log 👍

  • Huw Reddick 335 posts 1007 karma points
    Mar 03, 2021 @ 20:24
    Huw Reddick
    0

    I think we have all done that before :)

  • Alex Skrypnyk 5908 posts 22603 karma points MVP 4x admin c-trib
    Mar 03, 2021 @ 19:46
    Alex Skrypnyk
    0

    You are always welcome!

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies