How are you getting a simple 404 error page working?
I would really like to know how you all do your 404 (and maybe other types of) error pages in Umbraco.
According to what I've been able to find, it *should* be as simple as creating the page somewhere in your Umbraco solution and putting that page's ID in the umbracoSettings.config file. Done deal.
However, it seems to be not quite so simple - and, unfortunately, solutions that work for some people, don't work for others, so the forum is swamped with posts about this.
I also realize that what worked on IIS6 may not work on IIS7 and/or future versions - that's just the way it is...
So how do you do it? What works? Do I really need to write a handler for something like this (which seems to be the only thing that works for everybody)?
Good solution Rich - I always install uComponents anyway. But — alas, we're already in the "works for you - not for me" trap, 'cause I can't get that to work... and it's probably for the same reason that Umbraco's "standard" <error404>ID</error404> doesn't work - it really looks like those handlers never run, because I'm getting the server's errorpage (it's not Umbraco's anyway)...
Hmm, I have succesfully setup 404 pages in 4.0.2.1 and 4.7.1 installations without too much trouble all running on IIS7.5, by just doing what you describe above.
With what version are you having the trouble described above? Is it v4.x in general?
It certainly should not require you to write a handler to do it.
It (that's in the umbracoSettings.config flile) seems to be targeted to work only for the 404 error. And I've found that there's somehow unobvious logic in how it handles this configuration key. If you're interested you can find it in the umbraco.library.GetCurrentNotFoundPageId() method.
I have used your stated method of creating the error page somewhere in your Umbraco solution and putting that page's ID in the umbracoSettings.config file, with Umbraco 4.0.4.2 and 4.5.2, with IIS6.
If you are getting the server 404 page, then that would suggest the request is not being handled by Umbraco, in Umbraco 4 at least, it has its own error "intentionally ugly" page for not found pages.
Since the Our robot poked me to pick a solution here, I'll say that it *was* actually as simple as I'd written it, i.e., setting the ID of the designated page in umbracoSettings.config.
Key to the problem was (and I've found that to be the root of a couple of other problems too) that the IIS wasn't in "Integrated Mode" - on this specific site, didn't have access to the IIS so I'd assumed everything was setup as requested...
How are you getting a simple 404 error page working?
I would really like to know how you all do your 404 (and maybe other types of) error pages in Umbraco.
According to what I've been able to find, it *should* be as simple as creating the page somewhere in your Umbraco solution and putting that page's ID in the umbracoSettings.config file. Done deal.
However, it seems to be not quite so simple - and, unfortunately, solutions that work for some people, don't work for others, so the forum is swamped with posts about this.
I also realize that what worked on IIS6 may not work on IIS7 and/or future versions - that's just the way it is...
So how do you do it? What works? Do I really need to write a handler for something like this (which seems to be the only thing that works for everybody)?
Hey Chriztian,
Agree that it might not be necessary but I use this from uComponents http://ucomponents.codeplex.com/wikipage?title=SearchForPageNotFound
It also allows the user to select their own 404 page too.
Rich
Good solution Rich - I always install uComponents anyway. But — alas, we're already in the "works for you - not for me" trap, 'cause I can't get that to work... and it's probably for the same reason that Umbraco's "standard" <error404>ID</error404> doesn't work - it really looks like those handlers never run, because I'm getting the server's errorpage (it's not Umbraco's anyway)...
/Chriztian
Hmm, very strange and frustrating.
How are you installing Umbraco, via the WPI or manually, also are you using IIS Express or the full version?
Happy to do some testing here for you to see if I get the same results.
Rich
Hi Chriztian
Hmm, I have succesfully setup 404 pages in 4.0.2.1 and 4.7.1 installations without too much trouble all running on IIS7.5, by just doing what you describe above.
With what version are you having the trouble described above? Is it v4.x in general?
It certainly should not require you to write a handler to do it.
/Jan
...to add another solution to the mix, I always do it using the web.config and have no problems:
-Tom
It (that's in the umbracoSettings.config flile) seems to be targeted to work only for the 404 error. And I've found that there's somehow unobvious logic in how it handles this configuration key. If you're interested you can find it in the umbraco.library.GetCurrentNotFoundPageId() method.
Chriztian,
I have used your stated method of creating the error page somewhere in your Umbraco solution and putting that page's ID in the umbracoSettings.config file, with Umbraco 4.0.4.2 and 4.5.2, with IIS6.
If you are getting the server 404 page, then that would suggest the request is not being handled by Umbraco, in Umbraco 4 at least, it has its own error "intentionally ugly" page for not found pages.
Richard
Since the Our robot poked me to pick a solution here, I'll say that it *was* actually as simple as I'd written it, i.e., setting the ID of the designated page in umbracoSettings.config.
Key to the problem was (and I've found that to be the root of a couple of other problems too) that the IIS wasn't in "Integrated Mode" - on this specific site, didn't have access to the IIS so I'd assumed everything was setup as requested...
/Chriztian
is working on a reply...