Asp. NET platform and what happens after you enter it from the browser's address bar

Source: Internet
Author: User
Tags httpcontext

Browsers typically embed two modules:

Socket communication module → The browser places the data of the address bar and other data into the request header file of the HTTP protocol, and the socket sends this HTTP request data to the remote server side

Browser engine rendering module → The browser accepts HTTP response header data returned from the server and renders the data requested by the user into an interface that the user sees

Asp. NET developers and httpapplication,httpcontext,httprequest,httpresponse these four classes should be old acquaintances, and the ASP. NET event pipeline is also familiar to the ASP, as far as I am concerned, I have been a bit ignorant of these, although many documents are still found. In fact, these classes are the classes created after the ASP. NET Server accepts the browser's request, and the ASP. NET Server processes and responds to browser requests in this four class (mainly these four classes).

The HttpRuntime class is the gateway for ASP. The above four classes are created based on this class, and the HttpRuntime class creates these four classes to help it handle browser requests. Below is a brief summary of these four classes:
The HttpRequest class, which is a number of properties that represent the parameters of an HTTP request.

The HttpResponse class, which provides methods and properties for responding to clients.

The HttpContext class, which encapsulates objects of the HttpRequest class and the HttpResponse class, is designed to simplify server-side processing of HTTP parameters.

The HttpApplication class is the play, and this class is used to handle requests, and what we call the processing pipeline is created here. Because in the process of actual processing requests, we need to do a lot of work. If we do these tasks in one way, it is obvious that the method is bloated. In the HttpApplication, use. NET's event mechanism, which is the processing pipeline, by decomposing these processes into multiple steps through multiple events emitted during processing.

In the event pipeline's ProcessRequest event, the passed in parameter is an instance of the HttpContext class, because in this method we are processing the HTTP request in detail, and we need to get detailed information to pass in the HttpContext class instance.

The global rough run process is as follows:

This data and figure is from the Dark Horse programmer. NET Video and ASP. NET essence theory

Asp. NET platform and what happens after you enter it from the browser's address bar

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.