Is there a quick method for intercepting all controller calls in MVC-3?
For logging and testing purposes, I’d like to build a tool that can intercept all controller calls, and log which controller was called, with which message, at what time.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I can’t remember where I got this from, but I was looking around for something similar a while back and found an article or something somewhere that contained this logging filter:
To use it, just add it to the global filters in global.asax:
I’ll have a look now to see if I can find the source.
Edit: Found it. It was from this question.