Iis7 improvements to IIS6 and differences in Configuration Systems

Source: Internet
Author: User
Tags metabase

InAsp.net Running Mechanism in IIS 6In this article, we have a general understanding of the transfer of HTTP requests in IIS6 and how Asp.net runs in IIS6. However, IIS6 is a product of 10 years ago. Although many Asp.net applications are deployed on win2003 + IIS6, I believe that iis7 + will become more and more popular. As far as I am concerned, I started using iis7.5 only after I used win7. as I continue to use iis7 +, I think iis7 + is the best version so far.

It is said that iis7 has made many improvements to IIS6 (such as modularization, better security and scalability), but I am most impressed by the two changes:

  I. iis7 integration with Asp.net.

  2. Changes in the iis7 Configuration System (relative to IIS6.

   Iis7 integration with Asp.net

In IIS6, Asp.net is run in the form of ISAPI extension, that is, aspnet_isapi.dll. To some extent, Asp.net is only a plug-in for IIS6, asp.net is an ISAPI extension for IIS6, just like ASP is for IIS6 or PHP is for IIS6. In this way, the Asp.net function cannot be used to the maximum extent. For exampleAn attempt to rewrite a URL using the HTTP ModuleProblem encountered: I need to intercept the request sent by the client and rewrite the request. In IIS6, The Request Interception can only be restricted after IIS loads aspnet_isapi.dll. That is to say: if the request is not explicitly a request for Asp.net resources (for example, this request is only a request for a static file, for example, www.somenet.com/index.html?www.somenet.com/img1.jpg), we cannot write the Request Interception logic in the code, because IIS6 maps and loads the corresponding ISAPI Based on the URL suffix. If a request URL is: www.somenet.com/index.aspx, according ". aspx "suffix. IIS6 can know that this request is for Asp.net resources and should be loaded to create aspnet_isapi.dll. net runtime and run the Asp.net Page code, but it is obvious that IIS6 is generally considered not a request to Asp.net resources and therefore does not load aspnet_isapi, for example, "www.somenet.com/index.html ". . DLL to run Asp.net. Even if we write the code to intercept requests on the Asp.net page, it will not be executed. Of course, here I usually say there is a reason, because we can add the wildcard program ing method in IIS6, or in the web. in config, manually add a handler to a request to force IIS6 to load aspnet_isapi.dll for requests of non-Asp.net resource type. The process for executing the request in IIS6 is as follows:

But everything is quite different in iis7. In iis7, Asp.net no longer exists in IIS as an ISAPI, but is integrated into the IIS core. Let's take a look at the request processing process in iis7:

Asp.net requests in iis7 are no longer divided into two processing pipelines, but are integrated with Asp.net and IIS. There are many advantages to this, including unifying request verification, the ability of Asp.net to control requests is enhanced. In iis7, Asp.net is no longer limited to aspnet_isapi.dll as IIS6, but is freed from receiving HTTP requests from IIS, that is, entering the control scope of Asp.net, as.net can exist in each processing stage of a request in IIS. You can even provide Asp.net-based authentication for PHP applications deployed in iis7 (refer to: http://msdn.microsoft.com/zh-cn/magazine/cc135973.aspx ).

 

   Iis7 configuration system changes relative to IIS6

In iis7, another major improvement is its configuration system. In IIS6, the configuration information is stored in metabase. XML file (in the % WINDIR % \ system32 \ inetsrv folder), and in iis7, the configuration information is stored in applicationhost. config (in the % WINDIR % \ system32 \ inetsrv \ config folder ). This is not a simple file rename, but a large-scale reconstruction of the IIS configuration system. In fact, if you have been in contact with metabase. XML in IIS6, it is very difficult to manage the configuration information of this file. There is a lot of configuration information based on the memory structure, and the organizational structure is not so friendly for us, it is difficult to read. Iis7 makes improvements to the entire configuration system. NET developers) are very familiar with the structure to store configuration information (looks similar to web. config or app. config file ). The IIS team made such a massive change to the iis7 Configuration System to improve iis7 performance, scalability, and ease of management.

Comparison between IIS6 and iis7 in the configuration system:

 Features IIS6 Iis7  Comparison
External proxy configuration In IIS6, the IIS configuration is saved in metabase. xml and can only be modified by users with system administrator permissions. Iis7 configuration information is stored in applicationhost. config, but IIS can also be configured in Web. config.  
Organizational Structure The configuration attributes in metabase. XML are scattered in the Organization. Applicationhost. config is an organizational structure configuration method similar to Web. config. Each configuration section and element are displayed in a more friendly structure. Configuration entries are more logical and easier to read and manage configuration files.
Configuration synchronization problems IIS6 configuration is based on memory and also displayed in the metabase. xml file. Synchronization may occur, that is, the configuration value in memory is different from that in metabase. xml. Iis7 configuration is completely based on the configuration file.  
XML Schema Extension It is difficult to extend metabase. xml Based on iis_schema.xml, it is easier to expand and customize the configuration file.  

For more information, see http://programming4.us/website/4244.aspx?internet Internet "" Internet 7.0 (IIS) Resource Kit.

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.