ASP. NET MVC Source code Analysis

Source: Internet
Author: User

Let's go first. Diagram of the ASP. NET request mechanism by Preach Intelligence podcast Huadong Teacher

And then the teacher Zou added a diagram of the MVC request process

In fact, MVC is really. NETFramework a filter on the HttpModule in C:\Windows\Microsoft.NET\Framework\v4.0.30319

The <add name= "UrlRoutingModule-4.0" type= "System.Web.Routing.UrlRoutingModule" added in the configuration file below

The site will create this class at the first request and call its init () method to register on the event pipeline

1 browser sends HTTP requests to server IIS via messages

2IIS submit the request to the Extension module Aspnet_isapi.dll (c + + written unmanaged program, equivalent to IIS and the framework of the Intermediate program)

3 Framework Create HttpContext request context (Request/response/session/application/cookie/server ...)

4 Create Httpapplicaiton by HttpApplicationFactory Factory call it's PR method (event pipeline)

5 Seventh event creation Mvchanlder stored in HttpContext's private property Remaphandler (can be seen through. NET Reflector)

6 The eighth event is to judge whether the Remaphandler is empty if it is not empty httpcontent.remaphandler (Mvchandler);

7 A PR method that performs Mvchandler between 11/12 methods creates a Controller object

ASP. NET MVC Source code Analysis

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.