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:
- Check if there is a local machine code for this page in server memory
- If present, executes the local machine code and sends the result of the run to the client
- 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
- 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.