One of my first tasks on the project was to create a custom error 404 page that the users of our application will be redirected to in case of such an error. By default, an ASP.NET Core application will redirect you to a browser-specific error page. That’s not really helpful to the user, since on Mozilla Firefox the page will be simply blank. Other browsers’ versions aren’t pretty either and in general you as the developer want to provide the user with some information on why the error occurred and maybe show him/her a link to the Home page and such. Shortly after setting the custom 404 page I’ve realized that it would be good to catch other errors and exceptions too – and thankfully in ASP.net Core all of it is really easy.
Continue reading “Creating custom Error pages and catching Exceptions in ASP.NET Core 2.0”