Asp. The IE6 innovation of net bottom architecture exploration

Source: Internet
Author: User
Asp.net| Architecture

  IIS 5 and 6 work in a different way

When a request arrives, IIS checks the script mappings (extension mappings) and routes the request to aspnet_isapi.dll. The operation of this DLL and how requests enter the ASP.net runtime are different in IIS5 and 6. Figure 2 shows a rough overview of this process.

In IIS5, Aspnet_isapi.dll is hosted directly in the Inetinfo.exe process, and if you set the isolation for the Web site or virtual directory to be medium or high, you will be hosted in a separate (isolated) worker process in IIS. When the first ASP.net request arrives, the DLL (Aspnet_isapi.dll) starts another new process aspnet_wp.exe and routes the request to the process for processing. This process is loaded and hosted sequentially. NET Runtime. Each request forwarded to the ISAPI DLL is routed to the process through a named pipe call.

  

Figure 2-The process of requesting a pipeline to process from IIS to asp.net at a higher level. IIS5 and IIS6 interact with the asp.net in different ways, but once the request comes to the ASP.net pipeline, the whole process is the same.

Unlike previous versions of servers, IIS6 has made a comprehensive optimization for asp.net.

  Long Live iis6-application pool

IIS6 has made significant changes to the processing model, and IIS no longer directly hosts external executable code such as ISAPI extensions. IIS always creates a separate worker thread-an application pool-all of the processing takes place in this process, including the execution of the ISAPI DLL. The application pool is a great improvement for IIS6 because it allows fine-grained control over what code will be executed on the specified thread. Application pools can be configured on each virtual path or throughout the Web site so that you can isolate each Web application into their own processes so that each application is completely isolated from other Web applications running on the same machine. If a process crashes, it does not affect other processes (at least in the view of web processing).

More than that, the application pool is highly configurable. You can configure their operating security environment by setting the pool execution level (execution impersonation levels), which allows you to customize the permissions that are given to a Web application (again, with fine-grained granularity). A big improvement for asp.net is that the application pool overrides the settings for most of the processmodel sections in the Machine.config file. The settings in this section are very difficult to manage in IIS5 because these settings are global and cannot be overwritten in the application's Web.config file. When running IIS6 is, most of the processmodel related settings are ignored and are instead read from the application pool. Note that this is most of the-some settings, such as the size of the thread pool and the IO thread setting or reading from the Machine.config, because they do not have a corresponding entry in the setup of the online pool.

Because application pools are external executable programs, these executable programs can be easily monitored and managed. IIS6 offers a range of options for system health checks, restarts, and timeouts that can be conveniently used to check for problems that may even be corrected in many cases. The last IIS6 application pool is not as dependent on COM + as the IIS5 isolation mode, which can improve performance and stability (especially for applications that call COM components internally)

Although the IIS6 application pool is a separate exe, they are highly optimized for HTTP operations and communicate directly with the HTTP.sys driver in kernel mode. The received request is routed directly to the appropriate application pool. Inetinfo is basically just a management program and a configuration service program-most interactions actually happen directly between the HTTP.sys and the application pool, all of which make IIS6 a more stable and efficient environment than IIS5. This is true especially for static content and asp.net programs.

A IIS6 application pool has a natural knowledge of asp.net, asp.net can interact with it on the underlying API, which allows direct access to the HTTP cache APIs, which can send asp.net-level caches directly to the Web server.

In IIS6, the ISAPI extension runs in the worker process of the application pool. NET runtime is also running in the same process, the ISAPI extension and the. NET runtime communication occur within the process, which has a natural performance advantage over the named pipes used by IIS5. Although the host model for IIS is very different, the interfaces that enter managed code are unusually similar-only the process of routing messages is a little different.



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.