I have created an ASP.net 5 MVC6 project and added the following:
app.UseStatusCodePages();
inside my Configure method. If I run the application, open my web browser and navigate to the following URL:
ASP Displays a 404 error message which is the expected behavior. If I navigate to an even longer invalid URL such as:
I now get the following:
Bad Request - Invalid URL
If you navigate to the equivalent MSDN URL you get the same result. However If you navigate to the equivalent stackoverflow URL it is somehow handled. How are they handling this? and how can this be done in ASP.net MVC6?