All 404 Requests Being Handled, Except those to .aspx
I have been going round and round on this issue all week. Since no one can seem to agree upon a single reliable method for handling 404 errors and redirecting, I decided to go with the non Umbraco method. I have a .NET page that handles all 404 requests for any file extension, from any source and all looks good. Except... Any requests to a .aspx file result in the ugly Umbraco 404 page. No matter what I try, I cannot get these 404 requests to redirect to my 404 page.
I tried a custom error handler, no good. I set a custom error in my web.config and still no good. What next?
There is a section in the umbracoSettings.config file that defines what should be shown in case there is not a page that matches the url:
<errors>
<!-- the id of the page that should be shown if the page is not found -->
<!-- <errorPage culture="default">1</errorPage>-->
<!-- <errorPage culture="en-US">200</errorPage>-->
<error404>1</error404>
</errors>
Just replace the "1" with the ID of an umbraco page that you want to use.
I know, but since umbraco will handle any .aspx url, then you will need to let an umbraco page be the target. Should not be too difficult to share the functionality of your external page with th umbraco page. Just make a shared masterpage that they both use.
are you using iis 7.5? I had the same problem, I had to use IIS to customize the page. editing the umbracosettings config file didn't do anything, neither adding to the <customerrors> redirect section. the method described to give custom error in that .net notice might work for older iis, in my case I'm using IIS 7.5.
Yes, IIS 7.5 here as well. I looked at creating a wildcard in IIS but based on what I've read, that's a bad approach and causes performance issues. Seems the only workable method is to create a 404.aspx that I point IIS at. This is used for any non-Umbraco requests, such as to our old pages or someone guessing .html, etc. Then I use a handler in Umbraco for requests to .aspx/Umbraco content that does not exist. Problem I am having now is requests for .aspx are getting the ugly message. I had it working before. The whole process is ugly but if I can get the end result working.
End goal: 301 redirect requests to old pages based upon looking up old and new URLs in a SQL table. Anything without a match, I parse and send to the search page.
Follow up: Still unable to get Umbraco to handle requests for .aspx pages. All others being correctly handled by my stand alone 404 page specified via IIS.
Did you manage to get this working? I'm having same prob... all 404s (/something, /something.html, /something.jpg) except requests for missing .aspx pages.
All 404 Requests Being Handled, Except those to .aspx
I have been going round and round on this issue all week. Since no one can seem to agree upon a single reliable method for handling 404 errors and redirecting, I decided to go with the non Umbraco method. I have a .NET page that handles all 404 requests for any file extension, from any source and all looks good. Except... Any requests to a .aspx file result in the ugly Umbraco 404 page. No matter what I try, I cannot get these 404 requests to redirect to my 404 page.
I tried a custom error handler, no good. I set a custom error in my web.config and still no good. What next?
There is a section in the umbracoSettings.config file that defines what should be shown in case there is not a page that matches the url:
The page does not have an Id. It is an .aspx page outside of Umbraco.
I know, but since umbraco will handle any .aspx url, then you will need to let an umbraco page be the target. Should not be too difficult to share the functionality of your external page with th umbraco page. Just make a shared masterpage that they both use.
are you using iis 7.5? I had the same problem, I had to use IIS to customize the page. editing the umbracosettings config file didn't do anything, neither adding to the <customerrors> redirect section. the method described to give custom error in that .net notice might work for older iis, in my case I'm using IIS 7.5.
Yes, IIS 7.5 here as well. I looked at creating a wildcard in IIS but based on what I've read, that's a bad approach and causes performance issues. Seems the only workable method is to create a 404.aspx that I point IIS at. This is used for any non-Umbraco requests, such as to our old pages or someone guessing .html, etc. Then I use a handler in Umbraco for requests to .aspx/Umbraco content that does not exist. Problem I am having now is requests for .aspx are getting the ugly message. I had it working before. The whole process is ugly but if I can get the end result working.
End goal: 301 redirect requests to old pages based upon looking up old and new URLs in a SQL table. Anything without a match, I parse and send to the search page.
Follow up: Still unable to get Umbraco to handle requests for .aspx pages. All others being correctly handled by my stand alone 404 page specified via IIS.
Did you manage to get this working? I'm having same prob... all 404s (/something, /something.html, /something.jpg) except requests for missing .aspx pages.
Cheers for any help,
Still having the same issue with no good resolution.
Hi,
I managed to get this working by replacing the poetpatcher line in /config/404handlers.config with
<notFound assembly="umbraco" type="handle404"/>
More info at: http://our.umbraco.org/forum/templating/templates-and-document-types/13923-Unable-to-get-custom-404-page-to-work
is working on a reply...