I have a few sites that had custom 404 pages enabled in various different versions on Umbraco 4+
I've worked through instructions as per the documentation in Scott Gu's blog and today the additional umbraco.PoetPatch patch but I'm a little confused.
As I understand this issue all errors need to be mapped to the same page. Now having applied the patch to a site i'm now getting 3 different error pages returned.
Generic Umbraco page error (http://siteurl/test.aspx) - returns Umbraco's Page not found error. The ugly one I'm sure you know it ;-)
Custom 404 Error (http://siteurl/bin/test.aspx) - This returns me to the custom error I had setup before I implemented the customErrors On fix.
customErrors On error page (http://siteurl/umbraco/plugins/test.aspx) - This returns me to the error page I have specified in the customErrors tag in the web.config
Please could someone help me or explain why this is happening and how to fix it?
I've tested the urls on a site that I have 'patched':
/umbraco/plugins/test.aspx - gives me the proper 404 page that I expect to see from the poet patcher. Also, nearly any other incorrect url you can think of gives me this page - hence I thought I'd patched the site correctly.
/test.aspx gives me a totally empty page
/bin/test.aspx gives me an XML parsing error (empty source).
@webmonger: you need to turn off the standard 404 handler, thats the one returning the "ugly page", remove that from the /config/404handlers.config file, the custom error on /bin/test.aspx should also be mapped to the same error
@wtct: iit is important that all errors returned look exactly the same, so no you cannot set your own 404 page, it's a shame but this is the current workaround
@Per Plough Hansen: I understand "ASP.NET Security Vulnerability" but it doesn't mean that the patch must work like this (not see at defaultRedirect attribute and allways redirect to path written in dll - Umbraco.PoetPatcher.dll).
Well, our goal was to create a patch the solved the security issue, not to spend alot of time of providing configuration options, this keeps things simple and we know the page at that specific hardcoded url has the right timing code and response code setup
The lack of configuration options is a bit of a ball ach for me as I implemented the standard fix (Scott Gu Blog fix) manually yesterday to over 50 sites we host for clients as I could not wait for the Umbraco Package. About 35 of them are Umbraco sites the others are a selection of MVC, Forms and web services. I applied the standard fix in the same way accross the board as it was easy to impement.
I understand the need to get the fix out fast and believe me we a truly grateful. I'm just a little frustrated as this will require me to spend another 0.5 - 1 day getting this fixed on the sites again and changing the implementation on all the Umbraco sites.
Ps. The site I was refering to had the standard 404 code removed from the 404handlers.config and replaced with the new Umbraco.PoetPatch implemented but i had not added the aspx file the the /plugins/poetpathcer/CustomError.aspx
The URL http://our.umbraco.org/bin/test.aspx provides a standard IIS 404 error that is as I understand it being incorrectly mapped and should be dealt with? I think this is set in IIS. Do we need to re-map these pages as well?
I'm now started from scratch and setup the site as per the instructions and i'm still recieveing the generic ugly page. This site is Umbraco 4.0.3 and I'm not really sure what more I can do to fix this issue. I've touched the web.config, restarted the App Pool and even stopped and started the website do you have any sugestions?
I have now added the web.config settings and 404handlers.config settings as well as the new aspx Generic Error page.
I have found an interesting bug in 4.0.X sites though that is rather frustrating.
If you follow the 2. update the web.config instructions in the For Developers 1.2.pdf document it causes your error pages to be output is trace information visible no matter what the settings are in you web.config <trace /> tag.
For sites running on IIS6 with 2.0 or 3.5 you should remove the attribute redirectMode="ResponseRewrite" and your page will display properly.
Spent 4hrs debugging it. Was totally confused then I started to install the Package and noticed the difference, could have kicked myself for missing it!
I had 1 other issue regarding IIS7 hijacking error status for 404s (detailed here: http://our.umbraco.org/forum/using/ui-questions/8244-IIS7--404) that I had to correct by updating applicationHost.config, but once I did that and fixed this everything seems to work fine now using the POET workaround provided by Umbraco. Thanks
@Per - there is also another small typo in the docs regarding the web.config entry. I'm guessing most people see it and make the change, but if you copy and paste it as instructed it could be missed:
Poet Patch Question/Problem
I have a few sites that had custom 404 pages enabled in various different versions on Umbraco 4+
I've worked through instructions as per the documentation in Scott Gu's blog and today the additional umbraco.PoetPatch patch but I'm a little confused.
As I understand this issue all errors need to be mapped to the same page. Now having applied the patch to a site i'm now getting 3 different error pages returned.
Please could someone help me or explain why this is happening and how to fix it?
Cheers
Jon
Hey,
I've tested the urls on a site that I have 'patched':
/umbraco/plugins/test.aspx - gives me the proper 404 page that I expect to see from the poet patcher. Also, nearly any other incorrect url you can think of gives me this page - hence I thought I'd patched the site correctly.
/test.aspx gives me a totally empty page
/bin/test.aspx gives me an XML parsing error (empty source).
Weird. More info would be great.
David
I have just instaled ASP.NET Security Vulnerability Patch and I think that it works bad beacause:
It is no matter what we set in indefaultRedirect we allways are redirected to /umbraco/plugins/poetpathcer/CustomError.aspx
So we can't specify our cutom 404 page. We can only edit CustomError.aspx
@webmonger: you need to turn off the standard 404 handler, thats the one returning the "ugly page", remove that from the /config/404handlers.config file, the custom error on /bin/test.aspx should also be mapped to the same error
@wtct: iit is important that all errors returned look exactly the same, so no you cannot set your own 404 page, it's a shame but this is the current workaround
@Per Plough Hansen: I understand "ASP.NET Security Vulnerability" but it doesn't mean that the patch must work like this (not see at defaultRedirect attribute and allways redirect to path written in dll - Umbraco.PoetPatcher.dll).
Well, our goal was to create a patch the solved the security issue, not to spend alot of time of providing configuration options, this keeps things simple and we know the page at that specific hardcoded url has the right timing code and response code setup
Thanks for the response Per.
The lack of configuration options is a bit of a ball ach for me as I implemented the standard fix (Scott Gu Blog fix) manually yesterday to over 50 sites we host for clients as I could not wait for the Umbraco Package. About 35 of them are Umbraco sites the others are a selection of MVC, Forms and web services. I applied the standard fix in the same way accross the board as it was easy to impement.
I understand the need to get the fix out fast and believe me we a truly grateful. I'm just a little frustrated as this will require me to spend another 0.5 - 1 day getting this fixed on the sites again and changing the implementation on all the Umbraco sites.
Ps. The site I was refering to had the standard 404 code removed from the 404handlers.config and replaced with the new Umbraco.PoetPatch implemented but i had not added the aspx file the the /plugins/poetpathcer/CustomError.aspx
Guess what I get to do tomorrow ;)
Cheers
Jon
Hey Per
I've done further tests and there is definatly an issue here although it may well be to do with my understanding of the issue.
Here is an example a little closer to home heopefully we'll be able to wrap this up but I definatley think a step is missing from the guide.
The "Correct" Generic error page is displayed when you navigate to http://our.umbraco.org/test.aspx
The URL http://our.umbraco.org/bin/test.aspx provides a standard IIS 404 error that is as I understand it being incorrectly mapped and should be dealt with? I think this is set in IIS. Do we need to re-map these pages as well?
The URL http://our.umbraco.org/plugins/test.aspx seems to be corretly mapped on this site.
I'm now started from scratch and setup the site as per the instructions and i'm still recieveing the generic ugly page. This site is Umbraco 4.0.3 and I'm not really sure what more I can do to fix this issue. I've touched the web.config, restarted the App Pool and even stopped and started the website do you have any sugestions?
Jon
UPDATE (4 sites updated, 32 to go!):
I have now added the web.config settings and 404handlers.config settings as well as the new aspx Generic Error page.
I have found an interesting bug in 4.0.X sites though that is rather frustrating.
If you follow the 2. update the web.config instructions in the For Developers 1.2.pdf document it causes your error pages to be output is trace information visible no matter what the settings are in you web.config <trace /> tag.
For sites running on IIS6 with 2.0 or 3.5 you should remove the attribute redirectMode="ResponseRewrite" and your page will display properly.
Use:
For sites running 3.5 SP1 + you should use the customErrors tag as directed in the pdf.
Use:
Hope this helps others as it stumped me for a good half an hour.
Jon
Update (7 sites updated, 29 to go!)
It turns out there is a type in both of the PDFs explaining the updated 404handlers.config change.
INCORRECT:
CORRECT:
Notice the Umbraco namespace is spelt with a lower case u in the the PDF and it should be and Uppercase U.
Jon
ah crap, sorry about that typo :( I've updated the documentation
Cheers Per.
Spent 4hrs debugging it. Was totally confused then I started to install the Package and noticed the difference, could have kicked myself for missing it!
Cheers for updating the docs.
Jon
@webmonger - thanks for pointing out that issue in the documentation regarding the typo. That was (part) of my problem too.
See my thread here: http://our.umbraco.org/forum/core/general/12891-Strange-Issue-with-POET-patch
I had 1 other issue regarding IIS7 hijacking error status for 404s (detailed here: http://our.umbraco.org/forum/using/ui-questions/8244-IIS7--404) that I had to correct by updating applicationHost.config, but once I did that and fixed this everything seems to work fine now using the POET workaround provided by Umbraco. Thanks
@Per - there is also another small typo in the docs regarding the web.config entry. I'm guessing most people see it and make the change, but if you copy and paste it as instructed it could be missed:
Correct:
Incorrect (in the documentation) - "poetpatcher" typo:
Thanks all...
@bproven Glad I could be of help.
Jon
404 is my bad dream for my site
________________________________-
Be happy with funny jokes every day
is working on a reply...