Execute an MVC Application
Execute of MVC Application in ASP .NET
Step 1: Client sends request for the application to IIS
Step 2: IIS will redirect the request to global.asax file
Hear route table collection will be created by adding all the routes.
Step 3: Perform Routing --> hear URL routing module will check for the request route in route table collections.
If route is not available in route collection table error message will be send to client.
If request route is available create route object and then also create request object.
Step 4: Create MVC request handler:-
Hear MVC route handler class will take the route from route object and create the an object for the an MVC handler class by passing the request context object.
Hear request context object originally responsible to pass the request from ASP.net to MVC.
Get through the interview bar with our selected interview questions for ASP.Net enthusiasts
Step 5: Create controller:-
Hear MVC handler class identifies the controller that is to be executed with the help of request context object by using the route object.
It creates an object to the controller class.
Step 6: Execute controller:-
Hear execute method of the controller class will be called to start the execution of controllers.
Step 7: Invoke action:-
At this step MVC “run time will identify which action method should be called for execution and will invoke that method.”
Step 8: Execute result:-
Hear code in action method will be executed by using data from model class
Controller will be return to view
Step 9: Execute view:-
In this step complete view code will execute by using the model class data if necessary.
The executed result sends to client
Once result is delivered to client the execution result is completely destroyed at server
The types of result that an MVC application can handle take
- View result
- Redirect to route result
- Redirect result
- Content result
- Json result
- File result
For indepth understanding click on