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.
More Related Contents:
- Why does the EF 6 tutorial use asynchronous calls?
- Is Task.Run considered bad practice in an ASP .NET MVC Web Application?
- Injecting dependencies into ASP.NET MVC 3 action filters. What’s wrong with this approach?
- Effectively use async/await with ASP.NET Web API
- Correct way to use HttpContext.Current.User with async await
- Call asynchronous method in constructor?
- ValidateAntiForgeryToken purpose, explanation and example
- How to use signalr in Android
- CSS, Images, JS not loading in IIS
- Redirect From Action Filter Attribute
- Synchronously waiting for an async operation, and why does Wait() freeze the program here
- Email address validation using ASP.NET MVC data type attributes
- How to render a Razor View to a string in ASP.NET MVC 3?
- Facebook/ Twitter with dotnetopenauth? [closed]
- Pattern for calling WCF service using async/await
- Awaiting Asynchronous function inside FormClosing Event
- Async call with await in HttpClient never returns
- Mock HttpContext for unit testing a .NET core MVC controller?
- How do I define a method in Razor?
- How can I create a friendly URL in ASP.NET MVC?
- Reflecting parameter name: abuse of C# lambda expressions or syntax brilliance? [closed]
- If my interface must return Task what is the best way to have a no-operation implementation?
- Export Model to DataTable
- Date of Birth validation keeps showing
- Keyword Not Supported: Metadata
- Using Razor without MVC [duplicate]
- Where can I find the System.Linq.Dynamic dll?
- How to create a instance of UserCredential if I already have the value of Access Token?
- Timeout pattern on task-based asynchronous method in C#
- There is no ViewData item of type ‘IEnumerable’ that has the key country