Copied to clipboard

Flag this post as spam?

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


  • aaronb 97 posts 116 karma points
    Aug 05, 2011 @ 23:09
    aaronb
    0

    Typing an invalid url causes asp.net error instead of 404

    I'm dealing with an installation which is on a server farm, with cacheing, load balancing and replication.

    I'm in the process of trying to set up a custom 404 page, but have run into this issue.

    If I type an invalid URL, rather than give me the usual 404 error it throws an asp server error, "object reference not set to an instance of an object."

    As I'm understanding it, something is going wrong before umbraco's error URL handling even kicks in.

    The piece highlighted in red is this:

    Unhandled Execution Error


    Object reference not set to an instance of an object.
      at umbraco.requestHandler..ctor(XmlDocument umbracoContent, String url)
      at umbraco.UmbracoDefault.Page_PreInit(Object sender, EventArgs e)
      at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
      at System.EventHandler.Invoke(Object sender, EventArgs e)
      at System.Web.UI.Page.PerformPreInit()
      at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

    In the server variables section, the only page mentioned is default.aspx, even if this was not the page viewed directly before the incorrect URL was entered.

    I suspect this is going to be fairly complex due to the number of factors involved, but if anyone could give me a headstart or something I can suggest to the server guys that would be a massive help. The only thing I turned up was republishing the entire site, which I did but to no avail.

    thank you for any suggestions


  • Emil Rasmussen 67 posts 91 karma points
    Aug 26, 2011 @ 10:42
    Emil Rasmussen
    0

    Hi

    We got the same exception today, and solved it by adding this to the config/404handlers.config:

    <notFound assembly="umbraco" type="handle404"/>

    Hope it helps!

    Best regards
    Emil

     

  • Bjørn Fridal 274 posts 784 karma points
    Dec 18, 2011 @ 14:52
    Bjørn Fridal
    0

    Hi aaronb,

    Did you manage to find a solution? I am having the same problem with a website.

    Cheers

     

  • aaronb 97 posts 116 karma points
    Dec 19, 2011 @ 13:36
    aaronb
    0

    I believe we did get it fixed - but unfortunately I wasn't the one who fixed it, so I don't know the exact steps offhand. I will do my best to find out though, and update here if I can find anything out.

  • Bjørn Fridal 274 posts 784 karma points
    Dec 19, 2011 @ 14:05
    Bjørn Fridal
    0

    Thanks :)

  • Jordi Bartolomé 21 posts 41 karma points
    Aug 20, 2013 @ 09:55
    Jordi Bartolomé
    0

    Did you find any solution? I have the same problem!

Please Sign in or register to post replies

Write your reply to:

Draft