Search code examples
asp.net-mvcasynchronouscontrollerscaling

When should you use Async Controllers in ASP.NET MVC?


Changing an ASP.NET MVC synchronous controller (Controller) to an asynchronous controller (AsyncController) seems like a trivial thing to do, but when should you do it?

Should I just make every controller async irrespective of its actions? What are examples of operations that would be improved if used in an asynchronous controller?

Taking the most trivial example: static html pages. So you have the most basic of controllers which simply returns a View from the Index action. Should this controller be changed to asynchronous i.e. now returning from IndexCompleted?


Solution

  • I was reading this article recently. It think it summarizes what AsyncController are ment for.