I am trying to create a custom error page for 404 errors. I have implemented the Application_Error method in Global.asax.cs. For the most part this works great, but the method isn't getting called for URLs with 4 or more path segments.
The specific URL that I'm having trouble with is:
http://localhost/Area/Controller/Action/ID
If I remove the ID, my custom 404 age loads fine. The problem seems to be having 4 levels in my path (/Area/Controller/Action/ID). Any ideas?