Asp.net processes HTTP requests)

Source: Internet
Author: User

ASPThe times have passed,Web2.0The ERA has come.ASP. net2.0AfterMSHighly encapsulated inVs.netThe development under is completely silly, but I don't want to do it onlyCoding man.

In the past ASP Era, when a request *. Asp File, the request is first named Inetinfo.exe Process interception, open the task manager, and find Inetinfo.exe Actually WWW Service. Inetinfo.exe After the interception, immediately give the control to ASP. dll Process, ASP. DDL It will explain and execute this ASP Page, and then return the data stream Client Browser , If you are XP System, you can C: "Windows" System32 "inetsrv Directory. ASP We need to explain each request from the ground up. This is the most painful thing in the world.

Since there are newer technologies, and of course new technologies are to be used, the old technologies do not mean that you are dedicated-minded,^-^

In ASP. net2.0 Times, when Client Direction IIS Request *. Aspx File, the request is also Inetinfo.exe Process interception, Inetinfo.exe After determining the file suffix, send the request Aspnet_isapi.dll ,( You can C: "Windows" Microsoft. NET "Framework" v2.0.50727 Directory to find the file ) , And Aspnet_isapi.dll Httppipeline To send the request Aspnet_wp.exe Process, ( You can C: "Windows" Microsoft. NET "Framework" v2.0.50727 Directory, and you can also find the file in the task manager. ) , Once HTTP Request to enter Aspnet_wp.exe After the process, Asp.net framework It will pass Httpruntime To process the request, and then send the data stream back Client Browser.

Men who only like to chat with beautiful women are never good men. We can Httpruntime Looks like a pretty girl. Since she is a pretty girl, of course she has to study it. Httpruntime What is it? She is not an entity, but an execution Asp.net It is important to remember this abstract environment. Let's take a look Httpruntime How is it executed? When HTTP Request to enter Httpruntime The request will be sent to Httpapplication Factory In the factory, the factory for this HTTP Request to generate Httpapplication And then the instance is sent Httpmodule Container, and then HTTP Request to continue delivery Httphandler Factory Factory,

This factory also generates a httphandler instance, processrequire method to process the incoming request, and then hand over the processed result and control to httpmodule container, httpmodule the container then redirects the string from httphandler the data stream processed by the instance is sent back clinet end browser, such a HTTP the perfect request lifecycle is over.

remember, real processing HTTP httphandler instance processrequire method, the last data stream is sent back to client httpmodule in container.

After talking about this, I felt a bit messy. I drew a picture and sorted out the entire process.
 

The above is my personal understanding. If anything is wrong, please give me more advice.

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.