Copied to clipboard

Flag this post as spam?

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


  • Topic author was deleted

    Nov 25, 2013 @ 10:59

    Umbraco 7 on homepage: Object reference not set to an instance of an object. get_UmbracoUser() when using Internet Explorer

    I've a Umbraco 7.0.0 project in my Visual Studio 2012 update 4 IDE. When running Umbraco from Visual Studio I get there following error (without breaking to the debugger) :

    Object reference not set to an instance of an object.

    But when I type umbraco after the URL, the backoffice works OK. And after authenticating in the backoffice using my username/password the homepage of my site is displayed correct.

    It seems that Umbraco (see the get_UmbracoUser()  in the stacktrace) expect a authorized user. But of course I don't want to have my homepage available to only authenticated users.

    EDIT:

    After extra testing I found that this issue is not there when using Chrome.

     

    Stack trace:

    [NullReferenceException: Object reference not set to an instance of an object.]
       umbraco.BusinessLogic.User..ctor(IUser user) +114
       Umbraco.Web.UmbracoContext.get_UmbracoUser() +84
       Umbraco.Web.UmbracoContext.DetectInPreviewModeFromRequest() +246
       Umbraco.Web.UmbracoContext.get_InPreviewMode() +85
       Umbraco.Web.PublishedCache.ContextualPublishedCache.HasContent() +47
       Umbraco.Web.UmbracoModule.EnsureHasContent(UmbracoContext context, HttpContextBase httpContext) +68
       Umbraco.Web.UmbracoModule.EnsureUmbracoRoutablePage(UmbracoContext context, HttpContextBase httpContext) +181
       Umbraco.Web.UmbracoModule.ProcessRequest(HttpContextBase httpContext) +509
       Umbraco.Web.UmbracoModule.b__a(Object sender, EventArgs e) +132
       System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +136
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +69

     

  • Azlan Haron 2 posts 22 karma points
    Nov 28, 2013 @ 12:33
    Azlan Haron
    0

    I encounter the same problem, the different is i'm having the error in Chrome, but is working fine in IE

  • Rob 43 posts 79 karma points
    Dec 05, 2013 @ 02:02
    Rob
    0

    This has just happened to me also.. Chrome and Firefox - no worries. IE11 would return the following.

    [NullReferenceException: Object reference not set to an instance of an object.] umbraco.BusinessLogic.User..ctor(IUser user) +114

    What i found was that i had picked up a "toolbar" when i downloaded somethign from CNET. After removing the toolbar the problem went away.

    Interesting other things i noticed.
    Clearing Cookies fixed it.
    Using "In Private" fixed it.. (cookie based)

    If you login to the admin panel, next time you will need to have cleared your cookies or you would need to login.
    Check your toolbars.

    Rob

     

     

     

  • Comment author was deleted

    Dec 05, 2013 @ 07:22

    My problem was solved by going in to F12 mode in IE11 and clicking:

    - clear entries on navigate

    - clear browser cache

    - clear cookies for domain

    probalby only the last item is necessary, but I'm unable to reproduce the issue anymore.

  • Per Ploug 865 posts 3491 karma points MVP admin
    Dec 05, 2013 @ 08:25
    Per Ploug
    0

    I suspect its caused by cookies from a V6 installation, it could be the preview-mode cookie that is triggering the response on the frontend, which is why clearing your cookies fixes this issue.

    We havnt been able to reproduce it here ourselves, but it is something that we've seen a couple of users experiencing, so the current fix for this is, clear the cookies, either all, or just the ones on this specific domain

  • Azlan Haron 2 posts 22 karma points
    Dec 05, 2013 @ 08:54
    Azlan Haron
    0

    I deleted cookies and it fixes the problem. 

  • John Ligtenberg 53 posts 214 karma points
    Jan 17, 2014 @ 09:20
    John Ligtenberg
    1

    After having previewed a page, the UMB_PREVIEW cookie is set with an expiration time of a month. After closing the browser this cookie is not removed. This is unrelated to a V6 installation. Upon a subsequent visit this causes an error if the user is not logged in. Removing the cookie or logging in fixes the problem, but it is a bug.

  • Rob 43 posts 79 karma points
    Jan 17, 2014 @ 15:11
    Rob
    0

    ahhh.. thanks.! That now explains things.

Please Sign in or register to post replies

Write your reply to:

Draft