DNN Forums

Ask questions about your website to get help learning DNN and help resolve issues.

Object reference not set to an instance of an object.

Sort:
You are not authorized to post a reply.





New Around Here





    We have a website that seems to be working fine,  but it keeps throwing this error message over and over:

     

    AbsoluteURL:/Default.aspx

    DefaultDataProvider:DotNetNuke.Data.SqlDataProvider, DotNetNuke

    ExceptionGUID:7d42defc-a15b-4cb4-b69d-350b4fe808cb

    AssemblyVersion:

    PortalId:-1

    UserId:-1

    TabId:-1

    RawUrl:

    Referrer:

    UserAgent:

    ExceptionHash:9gFTpZMnF4ZFqFjOEPLN0pPwDTo=

    Message:Object reference not set to an instance of an object.

    StackTrace:

    at DotNetNuke.UI.Skins.Skin.InjectModule(Pane pane, ModuleInfo module)

     

    InnerMessage:

    InnerStackTrace:

    
     

     

    Source:DotNetNuke

    FileName:

    FileLineNumber:0

    FileColumnNumber:0

    Method:






    Veteran Member





      First, the basic questions: Which version of DNN are you using? Have you recently upgraded or added modules? Can you tell if this is new behavior or not?

      The only thing that the error message is telling you is that there is a problem injecting a module into the page, and that something is not initialized.

      Are you actually able to see pages? Are there any modules missing?

      Take a look at the log files in /portals/_default/logs. Look at the most recent one.

      If that doesn't provide more helpful information (and it might not!) modify DotNetNuke.log4net.config in the root of your installation and configure it for more detailed logging, though that's not guaranteed to help either.
      Joe Craig
      DNN MVP
      Patapsco Research Group





      Veteran Member





        Mostly this is a Skin / Theme issue, did you try using the default theme to see if that has this issue too?






        New Around Here





          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  before being used.

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


           






          Senior Member





            You already have nearly all of the best troubleshooting advice. The only additional thing I'd add is that this is usually caused by another underlying and often suppressed exception. Be sure to check the Log4Net log files as Joe suggested and maybe even the Windows Event Log, if you're not finding anything.

            In general, you should be checking your log files from time to time and getting rid of all exceptions you can find. The list of reasons you should do this is long. :)
            You are not authorized to post a reply.

            These Forums are dedicated to the discussion of DNN Platform.

            For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

            1. If you have (suspected) security issues, please DO NOT post them in the forums but instead follow the official DNN security policy
            2. No Advertising. This includes the promotion of commercial and non-commercial products or services which are not directly related to DNN.
            3. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
            4. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
            5. No Flaming or Trolling.
            6. No Profanity, Racism, or Prejudice.
            7. Site Moderators have the final word on approving / removing a thread or post or comment.
            8. English language posting only, please.

            Would you like to help us?

            Awesome! Simply post in the forums using the link below and we'll get you started.

            Get Involved