The operating insider of ASP.

Source: Internet
Author: User
Tags server memory

Each time the browser sends a page request to IIS, the corresponding Web page is compiled into a DLL file, which is then run by the JIT, and finally the result is sent to the client. Once the page has been sent a change, the next time you request the page, the page will be re-compiled into a DLL file, and then run by the JIT. To prevent file names from occurring, the generated DLL files are randomly named.

When a request is sent to IIS, its internal execution process is as follows:

    1. Check if there is a local machine code for this page in server memory
    2. If present, executes the local machine code and sends the result of the run to the client
    3. If there is no local machine code, check for the existence of this page compiled intermediate code, if present, then compile the intermediate code to the cost of machine code, and then execute the local machine code to return the results to the client, and the local machine code cached in memory
    4. If there is no corresponding intermediate code, the Web page is compiled into an intermediate code, then the intermediate code is compiled with the cost of machine code, the execution results of the local machine code are sent to the client, and the local machine code is cached in memory.

The following is the flowchart of the runtime:

From the above, when the server does not clean out the memory of the machine code, access to the same page, the server will directly execute the cache machine code, the speed is very fast. As a result, the ASPX page is opened for the first time, because the DLL file is compiled into machine code, and it is quicker to execute again later. Unless you modify the code, it is not necessary to rebuild the DLL, and for a slow first run, it can be resolved by precompilation.

PS: The above procedure can be installed after IIS, the ASPX file in the Inetpub\Wwwroot directory, and by the browser input http://localhost/+ "corresponding aspx file name", after returning the results, you can C:\Windows\ In the temporary files of the Microsoft.net\framework64\v2.0.50727\temporary ASP. net file, the root folder is found, and a randomly named DLL file is generated in this folder, as shown in:

The operating insider of ASP.

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.