In an ASP.NET MVC 4 application, we have set up a catch-all route as follows:
routes.MapRoute(
name: "UnKnown",
url: "{*url}",
defaults: new { controller = "CatchAll", action = "UnknownUrl" });
The UnknownUrl method in the CatchAllController correctly loads its view in our development environment.
However, the production IIS 7.5 shows its standard 404 page if a non-existing remote request arrives. A local request, sent using RDP on the server itself, works fine.
The web.config is set tp
<customErrors mode="Off"/>
What other difference is there between a local call and a remote call? How can we make the MVC HttpHandler catch those requests?
A hint might be that we were also unable to make the IIS show any detailed status 500 error messages when called remotely.