I have following ActionFilter
attributes implemented for web apis:
LogRequest
: This logs the request and response inOnActionExecuted
method.ValidateModel
: This validates the model and returnsBadRequest
by settingResponse
in OnActionExecuting` method.
Now the problem is that - requests for which we have returned BadRequest
(from ValidateModel
attribute) are not being logged because OnActionExecuted
(of LogRequest
attribute) is not getting fired.
Is there any way I can fire OnActionExecuted
intentionally?