ASP. NET page round-trip and Processing Mechanism

Source: Internet
Author: User

The processing cycle of ASP. NET pages is as follows:

1. the user requests a page through the client browser and the page runs for the first time.

2. ASP. NET on the Web server processes the requested page and translates it into HTML and JavaScript.

3. The tag is dynamically displayed in the browser. The browser parses and displays the tag.

4. Enter information or select from the options, or click the button.

5. The page is sent to the Web server. in ASP. NET, it is called "sending back" or "returning ".

6. The server executes the operations specified by the background code.

7. The server sends the page after the operation to the client browser in HTML or XHTML format.

 

Therefore, the lifecycle of ASP. NET applications can be divided:

1. the browser sends a page request to the Web server for the first time. ASP. NET is an ISAPI extension under the web server. After receiving the request, the web server checks the file extension of the requested file, determines which ISAPI extension should process the request, and then passes the request to the appropriate ISAPI extension.

 

2. The applicationmanager class creates an application domain for ASP. NET applications. The application domain provides application-level isolation for global variables and allows you to detach each application separately. In the application domain, create an instance for the hostingenvironment class, which provides access to information about the application (such as the name of the folder where the application is stored.

 

3. ASP. NET creates ASP. NET core objects for each request, such as httpapplication, httpcontext, httprequest, and httpresponse.

 

4. Assign the httpapplication object to the request and start the application. If an application has a global. asax file, ASP. NET creates an instance of the global. asax class and uses this derived class to represent the application ..

 

5. The httpapplication pipeline processes specific requests ..

 

As long as the Web server does not stop ASP. NET applications, ASP. NET applications will receive user requests and run them in steps 1 to 2.

 

 

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.