Copied to clipboard

Flag this post as spam?

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


  • MB 273 posts 936 karma points
    Mar 05, 2019 @ 18:21
    MB
    0

    Public Access - Object reference not set to an instance of an object

    Hi guys,

    I'm using Umbraco 7.13.2.

    • I added the Login snipper to a new page
    • I added my member group, types and added a member
    • I created a "test page" where I attempt to access Public Access
    • However I receive an error upon choosing either of the two options available.

    The error I get can be seen here: http://sp34k.com/error.txt

    // Mike

  • MB 273 posts 936 karma points
    Mar 18, 2019 @ 17:51
    MB
    0

    Okay I learned from this thread that it's probably related to permissions: https://our.umbraco.com/forum/umbraco-7/using-umbraco-7/71896-object-reference-not-set-to-an-instance-of-an-object

    Make sure that the app pool identity has access to create and modify the "access.config" file in the "App_Data" folder.

    Question is: I don't have that file and how do I change the permissions if I don't have a local IIS running? I'm working directly from the host UnoEuro.

    Here's a quick video of the error if that helps: https://www.youtube.com/watch?v=35RC3xQYGdM&feature=youtu.be

    // Mike

  • harlybake 3 posts 73 karma points
    Dec 22, 2020 @ 10:06
    harlybake
    0

    An Object is an instance of a Class , it is stored some where in memory. A reference is what is used to describe the pointer to the memory location where the Object resides. The message "object reference not set to an instance of an object" means that you are referring to an object the does not exist or was deleted or cleaned up. It's usually better to avoid a NullReferenceException than to handle it after it occurs. To prevent the error, objects that could be null should be tested for null before being used.

    if (mClass != null)
    {
      // Go ahead and use mClass
      mClass.property = ...
    }
    else
    {
      // Attempting to use mClass here will result in NullReferenceException
    }
    
Please Sign in or register to post replies

Write your reply to:

Draft