Request Life Cycle in Asp.Net MVC

Request Life Cycle in Asp.Net MVC:

In previous chapter we discussed the brief introduction of Asp.Net MVC application . Now we learn about the life cycle of request in Asp.Net MVC.  When a request in executed and response  is send to user b/w these many tasks are performed.  Below image show all the steps that are performed during execution. of request.

When a request is generated by the browser and result is send back to the browser, b/w these two stages following actions are performed.

·          Client browser send request to the MVC application.
·         URL Routing is take place. Generally pattern matching is a process  that matches the request’s URL against the registered URL patterns in the Route Table. If a pattern match occur then request is send to MVC handler, else 404 error is generated.
·         MVC handler initialize the real process and IHttpHandler interface is performed.
·         Now incoming request is directed to controller. MvcHandler uses the IControllerFactory instance and tries to get an IController instance. If instance is retrieved successfully then controller will executed.
·         After successfully initializingof  the IController instance required operations are performed and a result is generated and result pass to the view.
·         Now View render this result to the browser.


Post a Comment

Online Casino