Catch 404 errors in Asp.net Web API

asp.netasp.net-web-apierror handling

I am trying to catch 404 errors which are returned by the Asp.net Web API server.

However, Application_Error from inside Global.asax is not catching them.

Is there a way to handle these errors?

Best Answer

You might want to take a look at Handling HTTP 404 Error in ASP.NET Web API which has a step by step example