This question I often face from many subscribers. I think now it’s time when we can do the same: –
- IIS Receives the request and it send it to URLRouting Module which is simply an HTTPModule.
- URLRouting module checks the request path with the routes configured in the application.
- URLRoutingModule gets the IHTTPHandler from the corresponding routes. (MVCRouteHandler is the default route handler for MVC application.)
- MvCRouteHandler with the uses IControllerFactory and creates the instance of IController using the controller name in the request path. (DefaultControllerFactory is default in case of MVC.)
- MVCRouteHandler invokes execute method of controller.
- Controller uses the action name in the request method and executes the corresponding action method.
- In Action method we return ActionResult which internally invokes execute method of ActinResult class passing ControllerContext.
- When ActionResult is ViewResult , corresponding view of will be located using the configured View Engine.(By Default it is WebFormViewEngine)
- ViewResult finally invokes Render method.
For online live trainings on various technical topics including WCF, MVC, Design Patterns, BI, WPF, VSTS Application life cycle management and every other technology visit http://www.sukesh-marla.com/ or contact SukeshMarla@Gmail.com
Also click and see the following ASP.NET MVC interview questions video on sample of model using MVC template: –