Notice: Source Code is moved to GitHub due to Technet Wiki Gallery component retiring.

 

Asynchronous Controller benefits those situations where a web page has to perform a long running task and user cannot interact with other features of the website. Cancellation Token on the other hand is an important part of the Asynchronous Controller. Cancellation Token comes in handy when user want to cancel the long running process or to navigate to a new page. In a non-asynchronous controller environment whenever a long or slow processing is done on a web page, the interaction of the user with the web page will be compromised which results into web page being stuck, which apparently seems like webserver is down. Consider a situation where webserver take about 2 to 5 minutes to complete a task and even if user click page refresh, the response from webserver seems non-responsive, this happens because when a user click refresh, there is no way to signal the running process that user has canceled the process, hence, that process will continues to perform and the moment the process completes the action, the page will proceed with the designated user action. In such scenarios, it is important that at each cancellation, running process should be signaled and continue reading...