I am trying to make a custom HTTP 404 error page when someone types in a URL that doesn't invoke a valid action or controller in ASP.NET MVC
Instead of it displaying the generic Resource Not Found ASP.NET error
I don't want to use the web config to handle this...
Is there any kind of routing magic I can do to catch any invalid urls?
Update: I tried the answer given... however I still get the ugly resource not found message...
Another update Ok apparently something changed in RC1.. I've even tried specifically trapping 404 on an httpexception and it still just gives me the resource not found page
I've even used mvcContrib's resuce's feature and nothing same problem....any ideas anyone..please before I go nuts