asp.net framework Depth Adventure (1)

Source: Internet
Author: User
asp.net framework Depth Adventure (1)

Author:uestc95
E-mail:uestc95@263.net

Remember some time ago there is a good book called Delphi Depth Adventure, write well, I will temporarily borrow,:)
Here I do not intend to introduce the introduction of ASP.net, asp.net in addition to the name and the old ASP some of the same, has been completely changed, although you can still find in the asp.net you are familiar with session,application and so on, But don't try to equate them with the time of the ancient ASP session, and so on.
Let's slowly dive into the core of the ASP.net framework and see how she does it, and see how she can take on the next generation Web development technology platform.
This article does not want to complete the number of chapters, there is no need for the right to be in the form of diary, perhaps very short, perhaps very long, I will do my best to the asp.net framework to show in front of you.
If you don't know anything about the ASP.net framework, you can also be a asp.net coding, and if so, you don't have to keep watching.

Chapter one-Process a HTTP request.

Let's take a look at the operating mechanism and framework of the ASP.NET framework.
Before we begin, we'll follow archaeologists around the old ASP-run mechanism:
When you request a *.asp file, this HTTP Request was first intercepted by the Inetinfo.exe process, the Inetinfo.exe process is the WWW service process, and then she will transfer this request to the Asp.dll process, the Asp.dll process will explain the implementation of the ASP, and then return the interpreted data stream to the client browser.

Turn around and let's see how the asp.net framework handles an HTTP request today.
When you request a *.aspx file, the same HTTP request is intercepted by the Inetinfo.exe process, and after she determines the suffix of the file, the request is forwarded to aspnet_isapi.dll,aspnet_ ISAPI.dll will send the request to the Aspnet_wp.exe process via a pipeline called HTTP pipeline, when the HTTP request enters the aspnet_ After the WP.exe process, the request is processed through httpruntime, and the result is returned to the client.

OK, as if there is not much improvement, do not worry, in the asp.net framework we can even understand the httpruntime details. Okay, go ahead:
When the HTTP request enters the httpruntime, it continues into a container called HttpApplication factory, who gives a httpapplication to handle incoming requests. This request will go into the following several Container:httpmodule->httphandler Factory->httphandler in turn.
When the system internal HttpHandler Processresquest method processing completes, the entire HTTP request completes, the client also obtains the corresponding Dongdong.

Organize the process of processing an HTTP request by the ASP.net framework:

Httprequest-->inetinfo.exe-->aspnet_isapi.dll-->http pipeline-->aspnet_wp.exe-->httpruntime-- >httpapplication Factory-->httpapplication-->httpmodule-->httphandler Factory-->HttpHandler--> Httphandler.processrequest ()

May ask, I know what is the use of this process? Of course it works, like if you want to intercept an HTTP request and do your own processing, how do you do it? This is the next time we discuss the matter, the next time we discuss the details of the deal.
Later

(To be continued, welcome to explore: uestc95@263




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.