MVC does not have an async
-compatible action filter (but WebAPI does have one).
For now, I recommend you use blocking calls in OnActionExecuting
. Hopefully MVC will have a better story in the future.
Update: You can vote here for the MVC team to add async
filters.