Is there any way I can switch off the 404 handler provided by Umbraco? If this isn't possible / recommended, is there any way to get Umbraco to capture other types of error (i.e. 500)?
You can write your own implementation of the 404 based on The INotFound Interface and configure that in the 404Handlers config file buit why you wnat to do that, I'm pretty sure there is a better way to solve teh problem your are facing.
All I really wanted was to keep all my error pages together and looking consistent. I don't mind if they are all in Umbraco or if they are static pages on the file system (set with customErrors tag in web.config).
Do you have any ideas/best practices that will help with this?
I've removed the line from the file, touched the web.config, restarted IIS fully and I'm still getting the Umbraco 404 page:
--
Page not found
No umbraco document matches the url 'http://dev.southsomerset.gov.uk/asdfasdf'
umbraco tried this to match it using this xpath query'/root/node [@urlName = "asdfasdf"] | /root/node/node [@urlName = "asdfasdf"]')
This page can be replaced with a custom 404 page by adding the id of the umbraco document to show as 404 page in the /config/umbracoSettings.config file. Just add the id to the '/settings/content/errors/error404' element.
Can anyone confirm which pipeline mode I should be using for my app
pool please? I'm running Windows 2008/IIS7 with .NET 3.5 on Umbraco 4.0.3.
The reason I ask this is because I'm not sure if there are
additional configuration issues at play here. When I use integrated
mode, I can't get their handler to work at all. If I use Classic.NET
mode, I can't stop it from displaying (i.e. can't make it use my own
page).
I have added a handler mapping for all requests that points to \aspnet_isapi.dll. This was done to allow friendly URL's to work.
Just found out umbraco's 404 error page is also hard-coded in umbraco.UmbracoDefault (code-behind of default.aspx). Also if you disable the handle404 handler in 404handlers.config, you get an error with 4.5.2:
Object reference not set to an instance of an object.
[NullReferenceException: Object reference not set to an instance of an object.] umbraco.requestHandler..ctor(XmlDocument umbracoContent, String url) +3879 umbraco.UmbracoDefault.Page_PreInit(Object sender, EventArgs e) +2558 System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +24 System.EventHandler.Invoke(Object sender, EventArgs e) +0 System.Web.UI.Page.PerformPreInit() +48 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1699
Switching off 404 hander
HI,
Is there any way I can switch off the 404 handler provided by Umbraco? If this isn't possible / recommended, is there any way to get Umbraco to capture other types of error (i.e. 500)?
Thanks,
Matt
HI Matt,
You can write your own implementation of the 404 based on The INotFound Interface and configure that in the 404Handlers config file buit why you wnat to do that, I'm pretty sure there is a better way to solve teh problem your are facing.
Cheers,
Richard
Hi Richard,
Thanks for getting back to me so quickly.
All I really wanted was to keep all my error pages together and looking consistent. I don't mind if they are all in Umbraco or if they are static pages on the file system (set with customErrors tag in web.config).
Do you have any ideas/best practices that will help with this?
Thanks again,
Matt
You can also just remove the handle404 entry in the 404Handlers.config and handle everything yourself with the ASP.NET/IIS way :-)
That might be better in your case since yoiu want to have 1 file, make sure it's a HTML file otherwise your 500 error page can cause an error :P
Cheers,
Richard
I've just deleted the following line from the 404handlers.config file, and it doesn't seem to have made any difference:
<notFound assembly="umbraco" type="handle404"/>
I still get the Umbraco file not found message. What am I doing wrong???
Thanks,
Matt
I think you need to reset IIS
I'd say 'touch' the web.config ;-)
Sorry to be a bit dim about all this...
I've removed the line from the file, touched the web.config, restarted IIS fully and I'm still getting the Umbraco 404 page:
--
Page not found
No umbraco document matches the url 'http://dev.southsomerset.gov.uk/asdfasdf'
umbraco tried this to match it using this xpath query'/root/node [@urlName = "asdfasdf"] | /root/node/node [@urlName = "asdfasdf"]')
This page can be replaced with a custom 404 page by adding the id of the umbraco document to show as 404 page in the /config/umbracoSettings.config file. Just add the id to the '/settings/content/errors/error404' element.
For more information, visit information about custom 404 on the umbraco website.
This page is intentionally left ugly ;-)
--
Please help, I'm going mad...
Matt
Beats me...
If it's an option for you, you could handle 404 with using Umbraco?
http://our.umbraco.org/forum/using/ui-questions/4541-This-page-is-intentionally-left-ugly-%29---Umbraco-404-error-page
Hi again,
Can anyone confirm which pipeline mode I should be using for my app pool please? I'm running Windows 2008/IIS7 with .NET 3.5 on Umbraco 4.0.3.
The reason I ask this is because I'm not sure if there are additional configuration issues at play here. When I use integrated mode, I can't get their handler to work at all. If I use Classic.NET mode, I can't stop it from displaying (i.e. can't make it use my own page).
I have added a handler mapping for all requests that points to \aspnet_isapi.dll. This was done to allow friendly URL's to work.
Cheers,
Matt
Just found out umbraco's 404 error page is also hard-coded in umbraco.UmbracoDefault (code-behind of default.aspx).
Also if you disable the handle404 handler in 404handlers.config, you get an error with 4.5.2:
Object reference not set to an instance of an object.
is working on a reply...