The ASP.Net MVC Process Request Life Cycle

The ASP.Net MVC Process Request Life Cycle

Hello everyone, I am going to share the knowledge about the  ASP.Net MVC Request Life Cycle.

First,  I am going to share the MVC process request and after will discuss over the process request life cycle.

When you send the request to MVC application that means you are directly calling the controller's ActionMethod.

In the above requested URL, the "Customers" is  a controller and "Index" is a ActionMethod that means the we directly calling to action method for a particular controller.

Process Request Life Cycle

Step 1When you send a request to MVC Applications.

Step 2Create an instance of the RouteTable class.  Its create the first time when your MVC application start.
The RouteTable class hold the collection of objects and its derive from the RouteBase class.

Step 3After that,  the UrlRoutingModule interrupt each and every request and find the your matching RouteData from your RouteTable and  create an instance of MVC Handler as the  HttpHandler.

Step 4After that, the MVC handler  is create the DefaultControllerFactory. Its process the RequestContext and get the specific controller that you called and Its create the ControllerContext  and execute the controller.

Step 5After that, get the ActionMethod from the RouteData and builds controller's ActionMethod based on your request.

Step 6After that, the ActionMethod returns the ActionResult and renders the view.

You can see in the below images.


Hey! I'm Anil Singh. I author this blog. I'm Active Blogger, Programmer. I love learning new technologies, programming, blogging and participating the forum discussions more...
My Blogs - and
My Books - Interview Questions and Answers Books- Get Your Book in 15+ Digital Stores Worldwide..

You Might Also Like Powered by Blogger.
ASK Questions