The following describes how I handle the exception in my ASP.NET MVC application.
- Created a base controller and redefined the OnException method to catch all ASP.NET MVC pipeline errors.
- To capture errors that go beyond the scope of the ASP.NET MVC pipeline. those. 404. I am using the CustomError tag in web.config.
Now suppose my application is disabled and not working, but I still want my users to display some error page and want it to be configured at the IIS level. Can someone explain to me how we can achieve this, and I would also like to know the priority. I want to say that I want the IIS error priority to be the lowest.
source
share