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.
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.
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
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
Hi aaronb,
Did you manage to find a solution? I am having the same problem with a website.
Cheers
B
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.
Thanks :)
Did you find any solution? I have the same problem!
is working on a reply...