The note of learning ASP. NET [2] the whole process of processing the ASP. NET Runtime Library and returning the response

Source: Internet
Author: User
There were more jobs in the past two days in May 3, so we couldn't delay learning. We had a two-year plan .. I think no matter what I want to learn, Java, ASP, and ASP for web development. net, PHP everything is good, first understand the entire request to response life cycle is very useful, from the following flowchart can intuitively see a request from IIS to ASP. the entire process of processing and returning responses from the net Runtime Library. I want to contact more ASP. net Runtime Library, you can see that the request enters asp from IIS. after the net Runtime Library is run, the processed request will be mapped to the corresponding application through IIS and then proceed to the next step. Here, what does IIS process? What is httpapplication? At the bottom of the article, I listed an article on IIS Processing request. After reading this article, I should understand it better. I will give a rough explanation based on my understanding: because a server may run many applications (Web applications), IIS will determine which application the request is, and process the corresponding application sent by the request, that is, the [httpapplication] shown in the figure. httpapplication is the entry point of the entire application. When a request enters an application, the corresponding class does not process and respond immediately. We can see that there are two modules in front of the Web response: httpmodule and httphandler. httpmodule can perform a lot of centralized operations on incoming requests, such as Session, cache, after being processed by the httpmodule, it is found that there is cached or session data. In this way, the response can be returned without subsequent logic processing. For httphandler, you can set the suffix (*. aspx ,*. JPG ,*. XML, etc.) to determine to use the corresponding class for processing, if we are *. to customize a handler in JPG format, the user will execute the Custom Handler before accessing the image file on the server (module and handler are essentially a class, but it must inherit the corresponding interface). The Custom Handler can execute the corresponding code, such as adding a watermark to the image. In this way, the handler adds a watermark to the image before outputting the image when the user accesses the image file. In this case, if An ASPX file is requested, it will be processed by the class defined in the aspx handler and the generated HTML will be output. Both module and handler are configured in the application configuration file. We will study the. NET configuration file over the past two days. On ireaper, you can download a tutorial titled ASP for developers. net Development Technology series (3): JSP developers-Asp. net Architecture in-depth Mining, which describes the entire process in detail, and has a demo of a custom module and handler. This document describes how to add a watermark to an image by using handler. PS. here is an article about how IIS processes requests, the IIS processing process does not refer to the process from the client to initiate a request to the response lifecycle. It is just the process before IIS processes the request to the page life cycle. It also describes module and handler. Article address: http://www.dotnetfunda.com/articles/article821-beginners-guide-how-iis-process-aspnet-request-.aspx, a lot of E text, here two translation software is recommended, one is Google Kingsoft, the other is awesome!
Related Article

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.