Using MVC3 how do I get control before the Controller Action?
Posted on 2011-02-14
We installed MVC3 last week and have already changed a few views to use Razor, with .cshtml extensions. But we upgraded to MVC3 so we'd have the power to access the code before the first line of code is hit in the Controller Actions.
How do I do this?
And what kinds of things can be done with this new technology?
I have written a custom object that inherits from AuthorizeAttribute, and overrides AuthorizeCore(HttpContextBase httpContext). Would I still use this kind of authentication as an annotation above the Controller Actions?