Why my custom 404 error handler does not work after deployed to web server
问题 I followed this post and created a global error handler. And I added to handle 404 error myself. however, it works fine when I test locally but once deployed to web server, my custom message is not displaying anymore. Instead, the default ugly one shows up. In remote debug, I can trace the execution and it does get to my custom 404 error action, but somehow, the IIS took over at some point. In my Global.asax.cs, I have: protected void Application_Error() { var exception = Server.GetLastError(