The MSDN documentation for using an asynchronous controller mentions choosing an asynchronous controller when you want to provide a way for users to cancel requests.
I couldn’t find any documentation related to actually allowing users to cancel asynchronous requests, however. Is there a way to indicate to ASP.NET and/or the ASP.NET MVC framework that a request should be canceled?
If the asynchronous API that you called provides a way to cancel the request (either via .NET 4’s CancellationToken class or via a CancelAsync method), you must call that to cancel whatever asynchronous operations are in flight. Otherwise, call AsyncManager.Finish (via the controller’s AsyncManager property) to force the MVC framework to call your XxCompleted method immediately. Note that AsyncManager.Finish is really intended only if you need to bail out of requests that you have no other way of canceling (such as calling BeginXx / EndXx without a CancellationToken) and won’t always work in other scenarios.