782 Chapter 15 • Get Started with IIS 7.0’s Confi guration In our example, we stated that you were the site administrator for Web site 2. Now let’s say you are the application administrator for Application 1 (refer back to Figure 15.3). Could you have accomplished the same thing? The answer is yes. As long as directoryBrowse was unlocked at the ApplicationHost.confi g fi le, which in our example it is, and the new site administrator for Web site 2 didn’t disable it at the Web site level. If the site administrator decided that he or she did not want the ability to browse directories available for any applications on his or her site, the administrator would simply set <directoryBrowse enabled=“false”/> in his or her web.confi g fi le (see Figure 15.6). Now no one below the site administrator for Web site 2 can use directory browsing in his or her applications. Remember that the ApplicationHost.confi g fi le unlocked the directoryBrowse feature, and that allowed it to be delegated to administrators and developers below the system administrator. If an administrator above you disables a feature that has been unlocked from the ApplicationHost.confi g fi le, then even if you set the feature to true in your web.confi g fi le, he or she will override you if he or she has set that same feature set to false. Figure 15.5 directoryBrowse Allowed in ApplicationHost.confi g Get Started with IIS 7.0’s Confi guration • Chapter 15 783 Figure 15.6 Disabling a Feature in web.confi g BEST PRACTICES ACCORDING TO MICROSOFT Even though XML fi les can be edited via any text editor such as Notepad, Microsoft doesn’t actually recommend that you use it. The reason is the strict nature of XML. XML is case sensitive and has a tight structure. Editing these fi les in Notepad would make it very easy to make syntax errors and diffi cult to fi nd them. Microsoft recommends using a tool such as Visual Studio 2005. It makes reading XML easier. It color codes specifi c areas of a line and allows you to fi nd the number of a line that might be causing a problem. Visual Studio also guides you through creating XML fi les such as web.confi g in avoiding syntax errors, making it easier on you when you are working with these fi les. 784 Chapter 15 • Get Started with IIS 7.0’s Confi guration The System.ApplicationHost Section Group Purpose We’ve learned what section groups and sections are in the ApplicationHost.confi g fi le. Now it’s time to discuss one of the most important section groups there is: the system.ApplicationHost section group. Microsoft meticulously went through each part of the old metabase, broke it down into small pieces, and analyzed each piece from there. After the analysis, these pieces, based on functionality and purpose, were put into one of two locations: system.ApplicationHost or system.webServer section groups. The system.ApplicationHost section group includes sections that defi ne key parameters for a Web server. It holds sections that are used by the WAS service and are therefore defi ned globally. These sections include sites, application pools, applications, and virtual directories. They also contain some default settings for logging and application pools. Because it is a globally defi ned section group, it is protected from being delegated to nonadministrators. Figure 15.7 shows the actual system.ApplicationHost section group from the ApplicationHost.confi g fi le for IIS 7.0. Table 15.1 lists the sections and a brief explanation of each. SOME INDEPENDENT ADVICE Administrators who are not developers may have a tough time talking IT managers and CIOs into purchasing copies of Visual Studio for them so that they can easily edit .confi g fi les. Microsoft makes this easy for you. You can download express editions of Visual Studio for free at www.msdn.microsoft.com/vstudio/express. These are not full-blown editions of Visual Studio, but they will suffi ce in helping administrators who are not developers to work with these fi les—and at a cost any IT Manager or CIO can handle … free! Get Started with IIS 7.0’s Confi guration • Chapter 15 785 Figure 15.7 System.ApplicationHost Table 15.1 Sections in system.ApplicationHost Section Name Description applicationPools Contains a collection of application pools. customeMetadata Used by the metabase compatibility component and should not be modifi ed. listenerAdapters A collection of protocol adapters. Default protocol to serve is HTTP. log Contains global logging settings used by the WAS service. sites Contains the collection of site defi nitions. webLimits Contains some time-outs and limits used by the WAS service. By default this section is empty, and the defaults are taken from the schema. 786 Chapter 15 • Get Started with IIS 7.0’s Confi guration Understanding system.webserver Considered the most powerful section group in the ApplicationHost.confi g fi le, the system.webServer section group is where the power and magic of IIS 7.0 really take place. Gone is the monolithic Web server of the past; in comes a confi guration that fully supports IIS 7.0. This section group contains all the default settings for most of the more familiar metabase properties. It’s also where you will see new features, such as IIS 7.0’s failed request tracing. Figure 15.8 shows some of the system.webServer section group. Table 15.2 lists each of the sections in the system.webServer, and Table 15.3 lists the nested section groups and their individual sections. As we mentioned earlier, section groups can be nested within section groups; the system.webServer is a prime example of this. By default it nests three section groups with their own sections. Figure 15.8 system.webServer . service and are therefore defi ned globally. These sections include sites, application pools, applications, and virtual directories. They also contain some default settings for logging and application. time-outs and limits used by the WAS service. By default this section is empty, and the defaults are taken from the schema. 786 Chapter 15 • Get Started with IIS 7.0’s Confi guration Understanding. the old metabase, broke it down into small pieces, and analyzed each piece from there. After the analysis, these pieces, based on functionality and purpose, were put into one of two locations: