Friday, January 20, 2012

ASP.NET MVC2: Basics part 9 with Scott Hanselman

ASP.NET MVC2: Basics part 8 with Scott Hanselman

ASP.NET MVC2: Basics part 7 with Scott Hanselman

ASP.NET MVC2: Basics part 6 with Scott Hanselman

ASP.NET MVC2: Basics part 5 with Scott Hanselman

ASP.NET MVC2: Basics part 4 with Scott Hanselman

ASP.NET MVC2: Basics part 3 with Scott Hanselman

ASP.NET MVC2: Basics part 2 with Scott Hanselman

ASP.NET MVC2: Basics part 1 with Scott Hanselman

Asynchronous Controller on MVC



The AsyncController class enables you to write asynchronous action methods. Asynchronous action methods can be used for long-running, non-CPU bound requests. This avoids blocking the Web server from performing work while the request is being processed. On MVC, web services must use AsyncController class for long-running calls.

Change the Controller to AsyncController so that it inherits base class of AsyncController.


In the Model folder create a class


Back to the controller add IndexAsync Action, using TPL


And finally return data with the view