Thanks Manish, Interesting approach ( using IContentFinder ). However when I have really long querystring the handler is not evoked. It goes straight to "This page is intentionally left ugly".
This might indicate that somehow, very long query strings are actually blocked at IIS level without even entering your application. Could it be that somewhere in your web.config (or at machine.config for that matter) you have a maximum allowed request length specified that is lower than your "very long query string" length?
In your web.config it would look like something like this:
404 pages not working on long querystrings
I have set the id in umbracosettings to my "page not found" node.
So the following correct returns page not found
However... if i enter an insanely long querystring the famous "This page is intentionally left ugly ;-)" is returned.
I have the following in my web.config.
and
Well it is good to use _404iLastChanceFinder
Here is link to set up
Link 1
and Link 2
Thanks Manish, Interesting approach ( using IContentFinder ). However when I have really long querystring the handler is not evoked. It goes straight to "This page is intentionally left ugly".
Hi Anthony,
This might indicate that somehow, very long query strings are actually blocked at IIS level without even entering your application. Could it be that somewhere in your web.config (or at machine.config for that matter) you have a maximum allowed request length specified that is lower than your "very long query string" length?
In your web.config it would look like something like this:
Hope this helps...
Cheers,
Michael.
Thanks Michael, increasing this value enables the 404 page i specified in my umbraco.settings.
Great!
is working on a reply...