Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the advantage of using asynchronous controllers in asp.net mvc? [closed]

Tags:

c#

asp.net-mvc

What are the advantages of using Asynchronous controllers in my ASP.NET MVC website? Please explain using simple terms; I am not a .NET expert

like image 689
Abhishek Iyer Avatar asked Jun 14 '12 20:06

Abhishek Iyer


People also ask

What is the use of async controllers in MVC?

The asynchronous controller enables you to write asynchronous action methods. It allows you to perform long running operation(s) without making the running thread idle. It does not mean it will take lesser time to complete the action.

What is the primary purpose of using an asynchronous controller action?

You can use asynchronous action methods for long-running, non-CPU bound requests. This avoids blocking the Web server from performing work while the request is being processed.

Why we use async and await in MVC?

Async, Await And Asynchronous Programming In MVC. Async keyword is used to call the function/method as asynchronously. Await keyword is used when we need to get result of any function/method without blocking that function/method.

Why we use async and await in asp net core?

When we don't want to return a result from our async method, we should always return a Task. To validate our asynchronous operations, we have to use the await keyword while calling that operation. When we convert our synchronous code to asynchronous, we have to use the async and await keywords all the way up the chain.


1 Answers

I think the documentation says it in pretty simple terms: http://msdn.microsoft.com/en-us/library/ee728598.aspx

The AsyncController class enables you to write asynchronous action methods. You can use asynchronous action methods for long-running, non-CPU bound requests. This avoids blocking the Web server from performing work while the request is being processed.

Working URL : Using Asynchronous Methods in ASP.NET MVC 4

like image 132
Kiril Avatar answered Oct 22 '22 13:10

Kiril