Developing ASP.NET MVC Web Applications — Question 119

You are developing an ASP.NET MVC application. The application uses a set of custom exceptions to log errors that occur during the execution of an action.
You need to develop a class that implements logging.
Which interface should you implement?

Answer options

Correct answer: A

Explanation

The correct answer is A, IExceptionFilter, as it is specifically designed for handling exceptions that occur during the execution of an action, allowing for effective logging of errors. The other options, B, C, and D, do not focus on exception handling and logging, making them unsuitable for this purpose.