---
title: "How do Asynchronous Controllers work in Asp.Net?"  
description: "How do Asynchronous Controllers work in Asp.Net?"  
author: "Shikhar Arora"  
published: 2019-12-18  
updated: 2019-12-18  
canonical: https://www.mindstick.com/forum/155596/how-do-asynchronous-controllers-work-in-asp-dot-net  
category: "asp.net mvc"  
tags: [".net", "mvc"]  
reading_time: 2 minutes  

---

# How do Asynchronous Controllers work in Asp.Net?

Working of [Asynchronous](https://www.mindstick.com/blog/178/synchronous-and-asynchronous-command-execution-in-c-sharp-dot-net) [Controllers](https://www.mindstick.com/forum/155773/how-asynchronous-controllers-work-in-asp-dot-net-mvc)

## Replies

### Reply by Shikhar Arora

The working of Asynchronous Controllers is when users send a request to Asynchronous Controllers the asp.net will provide a thread from Thread pool to handle the request. If the request is small then it will process in normal way but in case if processing is taking too much time to complete then it will return process to thread pool for handling other request and whenever the asynchronous operation is complete, it informs ASP.NET then asp.net gets a worker thread from the thread pool (which might be a different thread from the thread that started the asynchronous operation) to process the remaining of the request, including rendering the response.

The convention required to follow when using Asynchronous Controllers. We have 2 Methods of Asynchronous Controllers

1. Async

2. Completed

## Async

The async method will return void and it starts the asynchronous process. The syntax of the async method in asp.net MVC like as shown below

```
Action Name Async
```

## Completed

This method is called when the asynchronous process is complete. The syntax of the Completed method in asp.net MVC like as shown below

```
Action Name Completed
```

We will learn these methods in detail with simple Examples. In this example we used web service (Weather service) in IndexAsync method in which we created a proxy client which will take Country name as input and will Return Cities then we will store cities in TempData["ListofCities"] when process will complete then it will call IndexCompleted() Method from which we will display result on view.


---

Original Source: https://www.mindstick.com/forum/155596/how-do-asynchronous-controllers-work-in-asp-dot-net

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
