IIS 6 Administration
|
|
Now that you understand the terminology associated with the XML metabase, let’s move on and examine in detail the structure and contents of the metabase configuration file MetaBase.xml. We’ll start by examining an actual metabase file from a freshly installed IIS machine. Remember, the MetaBase.xml file is the file that actually contains IIS configuration info—the other metabase file (MBSchema.xml) simply enforces what sort of XML content can be present in the MetaBase.xml file.
Analyzing a Sample MetaBase.xml File
The following pages show the contents of the MetaBase.xml file for a typical IIS 6 machine. I’ve added inline comments immediately after selected metabase features of interest.
<?xml version ="1.0"?>
The preceding statement is anXML declaration that must always be the first line of the MetaBase.xml file.
<configuration xmlns="urn:microsoft-catalog:XML_Metabase_V54_0">
The <configuration> element is the root (topmost) element of the file and contains all other XML elements in the file. At the end of this section, you’ll see the corresponding </configuration> tag as the last line of the file.
<MBProperty>
The <MBProperty> element is always contained directly within the <configuration> element and designates the remaining content of the file as representing metabase properties. As expected, the second last line of the file is </MBProperty>.
<IIS_Global Location ="." BINSchemaTimeStamp="248e296f33bfc201" ChangeNumber="443" HistoryMajorVersionNumber="6" SessionKey="49634b62980000004c00000040000000010200000168000000a400005fd46cd3 50fbc84e276e6bee11e5a845fd4e693aca95464cd73f2101d96435108a51807205057ede3178 af325b6f6aa71f20955d8e13d800d0a1c0597a35e16c3d0043006169d38aaa99cefece9c6f9d 744bf653fe205035818dcc8a4dffe8441ec44aff7027a460229502ff6cca80a3ce83abdb07fe b30a9128768904f38dc2c263c11d" XMLSchemaTimeStamp="a4c7356f33bfc201" > </IIS_Global>
The IIS_Global key is the highest-level property in the metabase. Note that the location of this property is ".", which indicates the top of the metabase hierarchy. Don’t edit any of the properties (attributes) for this node.
<IIS_ROOT Location ="/" AdminACL="49634462f0000000a4000000400000003b15b816894cdce9ee3d88e550da92f6d2 f3baf166bf973fc44300b048ddcb2f6c0bf739aea29375ad73f07d24a27bc9ffe2ae30ec615c d08f8b8813ff2353ddb5a48b8c6bcaee802d2b2cfad22fc3563513639dc23e5c7dcc38710955 bed070ca3459b5d1d056d816b5c731532d7edaad3c8aea36a105537c4eb0771b9bf8bfc3d080 9f81ba6fd34d6c58b8e1becdf18aa94c32f3f07334c21f5f12fcaf40a8d48f9c5157d28e113a 8e843c15ac7ead7b865e3a21b25b24c95ac6a0f7c33fdefeab8a8f51c38fceb722c2db960982 eb87bde6e844aa3cd4e08e3d6e7ed821e93257c3e597eabb09" > </IIS_ROOT>
The IIS_ROOT key is directly under the IIS_Global key and is thus a child key of IIS_Global. The location for the IIS_ROOT key is "/". Any properties IIS defines here (such as the previous AdminACL) apply generally to all aspects of IIS, including websites and FTP sites and NNTP and SMTP virtual servers. You generally don’t define or edit any properties here either.
<IIsComputer Location ="/LM" EnableEditWhileRunning="0" EnableHistory="1" MaxBandwidth="4294967295" MaxHistoryFiles="10" > </IIsComputer>
The IIsComputer key is a child node of IIS_ROOT and similarly defines properties that apply to IIS as a whole. Here, for example, the maximum network bandwidth used by all IIS services is specified, as are settings for edit-while-running and metabase history. You can modify some of these properties here directly using edit-while-running.
The location of the IIsComputer node in the metabase hierarchy is "/LM" (which stands for Local Machine). All remaining keys have locations that are of the form "/LM/stuff1[/stuff2[. . .]]", where stuff1 and stuff2 represent, for example, W3SVC for the WWW Service, AppPools for application pools, and so on. Another way of describing this is to say that the Local Machine (LM) namespace is the parent location for all sites and services on the IIS machine. The general syntax for the Location attribute of a key is
/LM/service/site/ROOT/virtualdirectory/directory/file
but there are many exceptions to this, as in /LM/IISADMIN, /LM/MimeMap, and so on, as you’ll see.
How can you understand the syntax of the property MaxBandwidth="4294967295" for the IIsComputer key? By looking up MaxBandwidth in the Metabase Reference in IIS Help. Here’s a short excerpt from the discussion in Help of this property so you can get a flavor for what’s found there:
The MaxBandwidth property specifies the maximum network bandwidth used for IIS. You can use this setting to help prevent overloading the network with IIS activity. This is not an inheritable property, but the value set at the machine level is globally available to all server instances. MaxBandWidth can be set individually, so that specific server instances are used instead of the global value, and can exceed the global setting established at the machine level.
The World Wide Web Publishing Service (WWW Service) must be restarted before changes to this property take effect.
The metabase represents unlimited as the DWORD value of 4294967295 (0xFFFFFFFF); however, VBScript represents unlimited in hexadecimal format as &HFFFFFFFF. Previous versions of IIS represented unlimited as -1.
<IIsConfigObject Location ="/LM/IISADMIN" > </IIsConfigObject>
The preceding IIsConfigObject key records any DCOM extensions to IIS.
<IIsConfigObject Location ="/LM/IISADMIN/EXTENSIONS" > </IIsConfigObject>
The preceding key is named IIsConfigObject like the one before it, but is distinguished by having a different Location attribute.
<IIsConfigObject Location ="/LM/IISADMIN/EXTENSIONS/DCOMCLSIDS" > <Custom Name="MD_IISADMIN_EXTENSIONS" Value="{61738644-F196-11D0-9953-00C04FD919C1}" Type="MULTISZ" UserType="IIS_MD_UT_SERVER" Attributes="NO_ATTRIBUTES" /> </IIsConfigObject> <IIsConfigObject Location ="/LM/IISADMIN/PROPERTYREGISTRATION" > <Custom Name="MD_METADATA_ID_REGISTRATION" Value="0-65535;Microsoft Reserved 65536-524288;Microsoft IIS Admin Objects Reserved" Type="MULTISZ" UserType="IIS_MD_UT_SERVER" Attributes="INHERIT" /> </IIsConfigObject>
You can see from the preceding that IIS can have many keys named IIsConfigObject!
<IIsLogModules Location ="/LM/Logging" AdminACL="49634462a000000058000000400000003b15b816894cdce95a3d88e584da92f6d2 f3baf166bf973fc4434cb04dddcb2f6c0bfb398ca29775ad70f07d24a27bc9cce2ae30cc6348 d007898813fe2253d895a48b895fc8ee802c2908fa5b2fc3531416639de23c5c7874cdc802d1 6f5faac05cafeba90944485c56bad32d7c36da2e0b7a2661dfecb6d0b431041e1b74fa75d5f5 6df4e802eeeffbafd80de2429a8e08b33e54108184" > </IIsLogModules>
The preceding key with location "/LM/Logging" is used to configure general aspects of IIS logging. More logging-related keys follow:
<IIsCustomLogModule Location ="/LM/Logging/Custom Logging" LogCustomPropertyServicesString="W3SVC MSFTPSVC SMTPSVC NNTPSVC" > </IIsCustomLogModule>
The preceding key specifies which IIS services can use IIS logging.
<IIsCustomLogModule Location ="/LM/Logging/Custom Logging/Date" LogCustomPropertyDataType="6" LogCustomPropertyHeader="date" LogCustomProperty LogCustomPropertyMask="1" LogCustomPropertyName="Date" LogCustomPropertyNode > </IIsCustomLogModule> <IIsCustomLogModule Location ="/LM/Logging/Custom Logging/Extended Properties" LogCustomPropertyDataType="6" LogCustomProperty LogCustomPropertyName="Extended Properties" LogCustomPropertyNode > </IIsCustomLogModule> <IIsCustomLogModule Location ="/LM/Logging/Custom Logging/Extended Properties/Bytes Received" LogCustomPropertyDataType="3" LogCustomPropertyHeader="cs-bytes" LogCustomPropertyMask="8192" LogCustomPropertyName="Bytes Received" LogCustomPropertyNode > </IIsCustomLogModule>
Now we’re into keys that define specific properties for the W3C Extended Log file format. The preceding key defines the Bytes Received property, which appears as the cs-bytes field in log files created using this log file format. Note how many keys have the same name (IisCustomLogModule) but different locations, and note the hierarchical value of the Location attribute. More keys follow, defining additional properties for this log file format.
<IIsCustomLogModule Location ="/LM/Logging/Custom Logging/Extended Properties/ Bytes Sent" LogCustomPropertyDataType="3" LogCustomPropertyHeader="sc-bytes" LogCustomPropertyMask="4096" LogCustomPropertyName="Bytes Sent" LogCustomPropertyNode > </IIsCustomLogModule> <IIsCustomLogModule Location ="/LM/Logging/Custom Logging/Extended Properties/Client IP Address" LogCustomPropertyDataType="6" LogCustomPropertyHeader="c-ip" LogCustomPropertyMask="4" LogCustomPropertyName="Client IP Address" LogCustomPropertyNode > </IIsCustomLogModule> <IIsCustomLogModule Location ="/LM/Logging/Custom Logging/Extended Properties/Cookie" LogCustomPropertyDataType="6" LogCustomPropertyHeader="cs(Cookie)" LogCustomPropertyMask="131072" LogCustomPropertyName="Cookie" LogCustomPropertyNode > </IIsCustomLogModule> <IIsCustomLogModule Location ="/LM/Logging/Custom Logging/Extended Properties/ Host" LogCustomPropertyDataType="6" LogCustomPropertyHeader="cs-host" LogCustomPropertyMask="1048576" LogCustomPropertyName="Host" LogCustomPropertyNode > </IIsCustomLogModule> <IIsCustomLogModule Location ="/LM/Logging/Custom Logging/Extended Properties/Method" LogCustomPropertyDataType="6" LogCustomPropertyHeader="cs-method" LogCustomPropertyMask="128" LogCustomPropertyName="Method" LogCustomPropertyNode > </IIsCustomLogModule> <IIsCustomLogModule Location ="/LM/Logging/Custom Logging/Extended Properties/Protocol Status" LogCustomPropertyDataType="3" LogCustomPropertyHeader="sc-status" LogCustomPropertyMask="1024" LogCustomPropertyName="Protocol Status" LogCustomPropertyNode > </IIsCustomLogModule> <IIsCustomLogModule Location ="/LM/Logging/Custom Logging/Extended Properties/Protocol Substatus" LogCustomPropertyDataType="3" LogCustomPropertyHeader="sc-substatus" LogCustomPropertyMask="2097152" LogCustomPropertyName="Protocol Substatus" LogCustomPropertyNode > </IIsCustomLogModule> <IIsCustomLogModule Location ="/LM/Logging/Custom Logging/Extended Properties/Protocol Version" LogCustomPropertyDataType="6" LogCustomPropertyHeader="cs-version" LogCustomPropertyMask="524288" LogCustomPropertyName="Protocol Version" LogCustomPropertyNode > </IIsCustomLogModule> <IIsCustomLogModule Location ="/LM/Logging/Custom Logging/Extended Properties/Referer" LogCustomPropertyDataType="6" LogCustomPropertyHeader="cs(Referer)" LogCustomPropertyMask="262144" LogCustomPropertyName="Referer" LogCustomPropertyNode > </IIsCustomLogModule> <IIsCustomLogModule Location ="/LM/Logging/Custom Logging/Extended Properties/Server IP" LogCustomPropertyDataType="6" LogCustomPropertyHeader="s-ip" LogCustomPropertyMask="64" LogCustomPropertyName="Server IP Address" LogCustomPropertyNode > </IIsCustomLogModule> <IIsCustomLogModule Location ="/LM/Logging/Custom Logging/Extended Properties/Server Name" LogCustomPropertyDataType="6" LogCustomPropertyHeader="s-computername" LogCustomPropertyMask="32" LogCustomPropertyName="Server Name" LogCustomPropertyNode > </IIsCustomLogModule> <IIsCustomLogModule Location ="/LM/Logging/Custom Logging/Extended Properties/Server Port" LogCustomPropertyDataType="3" LogCustomPropertyHeader="s-port" LogCustomPropertyMask="32768" LogCustomPropertyName="Server Port" LogCustomPropertyNode > </IIsCustomLogModule> <IIsCustomLogModule Location ="/LM/Logging/Custom Logging/Extended Properties/Service Name" LogCustomPropertyDataType="6" LogCustomPropertyHeader="s-sitename" LogCustomPropertyMask="16" LogCustomPropertyName="Service Name" LogCustomPropertyNode > </IIsCustomLogModule> <IIsCustomLogModule Location ="/LM/Logging/Custom Logging/Extended Properties/ Time Taken" LogCustomPropertyDataType="3" LogCustomPropertyHeader="time-taken" LogCustomPropertyMask="16384" LogCustomPropertyName="Time Taken" LogCustomPropertyNode > </IIsCustomLogModule> <IIsCustomLogModule Location ="/LM/Logging/Custom Logging/Extended Properties/ URI Query" LogCustomPropertyDataType="6" LogCustomPropertyHeader="cs-uri-query" LogCustomPropertyMask="512" LogCustomPropertyName="URI Query" LogCustomPropertyNode > </IIsCustomLogModule> <IIsCustomLogModule Location ="/LM/Logging/Custom Logging/Extended Properties/ URI Stem" LogCustomPropertyDataType="6" LogCustomPropertyHeader="cs-uri-stem" LogCustomPropertyMask="256" LogCustomPropertyName="URI Stem" LogCustomPropertyNode > </IIsCustomLogModule> <IIsCustomLogModule Location ="/LM/Logging/Custom Logging/Extended Properties/ User Agent" LogCustomPropertyDataType="6" LogCustomPropertyHeader="cs(User-Agent)" LogCustomPropertyMask="65536" LogCustomPropertyName="User Agent" LogCustomPropertyNode > </IIsCustomLogModule> <IIsCustomLogModule Location ="/LM/Logging/Custom Logging/Extended Properties/ User Name" LogCustomPropertyDataType="6" LogCustomPropertyHeader="cs-username" LogCustomPropertyMask="8" LogCustomPropertyName="User Name" LogCustomPropertyNode > </IIsCustomLogModule> <IIsCustomLogModule Location ="/LM/Logging/Custom Logging/Extended Properties/ Win32 Status" LogCustomPropertyDataType="3" LogCustomPropertyHeader="sc-win32-status" LogCustomPropertyMask="2048" LogCustomPropertyName="Win32 Status" LogCustomPropertyNode > </IIsCustomLogModule>
That’s the end of keys defining properties for the W3C Extended Log file format!
<IIsCustomLogModule Location ="/LM/Logging/Custom Logging/Time" LogCustomPropertyDataType="6" LogCustomPropertyHeader="time" LogCustomProperty LogCustomPropertyMask="2" LogCustomPropertyName="Time" LogCustomPropertyNode > </IIsCustomLogModule> <IIsLogModule Location ="/LM/Logging/Microsoft IIS Log File Format" LogModule LogModuleUi >
The preceding is a key related to the Microsoft IIS Log file format, and the following two keys are for NCSA and ODBC logging:
</IIsLogModule> <IIsLogModule Location ="/LM/Logging/NCSA Common Log File Format" LogModule LogModuleUi > </IIsLogModule> <IIsLogModule Location ="/LM/Logging/ODBC Logging" LogModule LogModuleUi > </IIsLogModule>
Here’s another key for the W3C Extended Log file format:
<IIsLogModule Location ="/LM/Logging/W3C Extended Log File Format" LogModule LogModuleUi > </IIsLogModule>
That’s the end of keys related to logging. There’s really no reason for editing these keys directly. Instead, you should use IIS Manager for configuring all aspects of IIS logging.
Now let’s move on to global MimeMap properties. The IIsMimeMap key that comes next is a long one that contains the various MIME associations defined globally for IIS. Changes made to the properties sheet of the servername node in IIS Manager (see Figure 14-5, later in this chapter) are saved under this key in the Registry.
<IIsMimeMap Location ="/LM/MimeMap" MimeMap=".asx,video/x-ms-asf .xml,text/xml .tsv,text/tab-separated-values .ra,audio/x-pn-realaudio .sv4crc,application/x-sv4crc .spc,application/x-pkcs7-certificates .pmc,application/x-perfmon .lit,application/x-ms-reader .crd,application/x-mscardfile .isp,application/x-internet-signup .wmlsc,application/vnd.wap.wmlscriptc .vst,application/vnd.visio .ttf,application/octet-stream .pfm,application/octet-stream .csv,application/octet-stream .aaf,application/octet-stream .hta,application/hta .323,text/h323 .mhtml,message/rfc822 .midi,audio/mid .p7r,application/x-pkcs7-certreqresp .mny,application/x-msmoney .clp,application/x-msclip .vsd,application/vnd.visio .lpk,application/octet-stream .bin,application/octet-stream .x,application/directx .wvx,video/x-ms-wvx .vcf,text/x-vcard .htc,text/x-component .htt,text/webviewhtml .h,text/plain .mht,message/rfc822 .mid,audio/mid .p7b,application/x-pkcs7-certificates .gz,application/x-gzip .dvi,application/x-dvi .cpio,application/x-cpio .vdx,application/vnd.visio .xlm,application/vnd.ms-excel .fdf,application/vnd.fdf .setreg,application/set-registration-initiation .eps,application/postscript .p7s,application/pkcs7-signature .toc,application/octet-stream .mdp,application/octet-stream .ics,application/octet-stream .chm,application/octet-stream .asi,application/octet-stream .afm,application/octet-stream .evy,application/envoy .wmp,video/x-ms-wmp .qt,video/quicktime .mpv2,video/mpeg .xslt,text/xml .etx,text/x-setext .png,image/png .cod,image/cis-cod .snd,audio/basic .au,audio/basic .man,application/x-troff-man .qtl,application/x-quicktimeplayer .pmw,application/x-perfmon .class,application/x-java-applet .iii,application/x-iphone .csh,application/x-csh .z,application/x-compress .vtx,application/vnd.visio .vsw,application/vnd.visio .wps,application/vnd.ms-works .ps,application/postscript .p7c,application/pkcs7-mime .thn,application/octet-stream .dot,application/msword .doc,application/msword .sgml,text/sgml .nws,message/rfc822 .pbm,image/x-portable-bitmap .ief,image/ief .wav,audio/wav .texi,application/x-texinfo .mvb,application/x-msmediaview .hdf,application/x-hdf .vsx,application/vnd.visio .psm,application/octet-stream .java,application/octet-stream .eot,application/octet-stream .jar,application/java-archive .mpeg,video/mpeg .map,text/plain .uls,text/iuls .rf,image/vnd.rn-realflash .m3u,audio/x-mpegurl .wma,audio/x-ms-wma .aifc,audio/aiff .mdb,application/x-msaccess .stl,application/vnd.ms-pki.stl .setpay,application/set-payment-initiation .prm,application/octet-stream .mix,application/octet-stream .lzh,application/octet-stream .hhk,application/octet-stream .xaf,x-world/x-vrml .flr,x-world/x-vrml .IVF,video/x-ivf .cnf,text/plain .asm,text/plain .tiff,image/tiff .wax,audio/x-ms-wax .ms,application/x-troff-ms .tcl,application/x-tcl .shar,application/x-shar .sh,application/x-sh .nc,application/x-netcdf .hlp,application/winhlp .oda,application/oda .pfb,application/octet-stream .fla,application/octet-stream .wm,video/x-ms-wm .rgb,image/x-rgb .ppm,image/x-portable-pixmap .ram,audio/x-pn-realaudio .sit,application/x-stuffit .dir,application/x-director .mpp,application/vnd.ms-project .xla,application/vnd.ms-excel .ssm,application/streamingmedia .axs,application/olescript .ods,application/oleobject .psp,application/octet-stream .jpb,application/octet-stream .wrz,x-world/x-vrml .m1v,video/mpeg .mno,text/xml .cmx,image/x-cmx .jpeg,image/jpeg .dib,image/bmp .rmi,audio/mid .aiff,audio/aiff .wmd,application/x-ms-wmd .wri,application/x-mswrite .pub,application/x-mspublisher .ins,application/x-internet-signup .wks,application/vnd.ms-works .xls,application/vnd.ms-excel .ai,application/postscript .crl,application/pkix-crl .qxd,application/octet-stream .dwp,application/octet-stream .xof,x-world/x-vrml .wmv,video/x-ms-wmv .nsc,video/x-ms-asf .mpa,video/mpeg .pnm,image/x-portable-anymap .rpm,audio/x-pn-realaudio-plugin .aif,audio/x-aiff .me,application/x-troff-me .pml,application/x-perfmon .trm,application/x-msterminal .m13,application/x-msmediaview .js,application/x-javascript .dxr,application/x-director .xlt,application/vnd.ms-excel .xlc,application/vnd.ms-excel .p10,application/pkcs10 .smi,application/octet-stream .sea,application/octet-stream .hqx,application/mac-binhex40 .spl,application/futuresplash .movie,video/x-sgi-movie .lsf,video/x-la-asf .txt,text/plain .jfif,image/pjpeg .jpe,image/jpeg .zip,application/x-zip-compressed .wmf,application/x-msmetafile .m14,application/x-msmediaview .latex,application/x-latex .wcm,application/vnd.ms-works .hhp,application/octet-stream .aca,application/octet-stream .jcz,application/liquidmotion .wrl,x-world/x-vrml .wmx,video/x-ms-wmx .asr,video/x-ms-asf .lsx,video/x-la-asf .xsl,text/xml .html,text/html .tif,image/tiff .der,application/x-x509-ca-cert .pfx,application/x-pkcs12 .p12,application/x-pkcs12 .cur,application/octet-stream .hdml,text/x-hdml .htm,text/html .xbm,image/x-xbitmap .jpg,image/jpeg .texinfo,application/x-texinfo .xlw,application/vnd.ms-excel .rm,application/vnd.rn-realmedia .pdf,application/pdf .rar,application/octet-stream .psd,application/octet-stream .inf,application/octet-stream .emz,application/octet-stream .dsp,application/octet-stream .jck,application/liquidmotion .mpe,video/mpeg .mp2,video/mpeg .sct,text/scriptlet .ras,image/x-cmu-raster .swf,application/x-shockwave-flash .wmz,application/x-ms-wmz .gtar,application/x-gtar .dcr,application/x-director .pps,application/vnd.ms-powerpoint .p7m,application/pkcs7-mime .ocx,application/octet-stream .mov,video/quicktime .wmls,text/vnd.wap.wmlscript .cpp,text/plain .c,text/plain .bas,text/plain .css,text/css .art,image/x-jg .mp3,audio/mpeg .t,application/x-troff .roff,application/x-troff .tar,application/x-tar .hhc,application/x-oleobject .scd,application/x-msschedule .pko,application/vnd.ms-pki.pko .sst,application/vnd.ms-pki.certstore .ppt,application/vnd.ms-powerpoint .pcx,application/octet-stream .msi,application/octet-stream .exe,application/octet-stream .asd,application/octet-stream .fif,application/fractals .mpg,video/mpeg .vml,text/xml .xdr,text/plain .vcs,text/plain .hxt,text/html .eml,message/rfc822 .xpm,image/x-xpixmap .ico,image/x-icon .gif,image/gif .dwf,drawing/x-dwf .src,application/x-wais-source .tr,application/x-troff .pmr,application/x-perfmon .pma,application/x-perfmon .dll,application/x-msdownload .bcpio,application/x-bcpio .wmlc,application/vnd.wap.wmlc .wdb,application/vnd.ms-works .pot,application/vnd.ms-powerpoint .rtf,application/rtf .prf,application/pics-rules .snp,application/octet-stream .cab,application/octet-stream .avi,video/x-msvideo .asf,video/x-ms-asf .dtd,text/xml .wml,text/vnd.wap.wml .vbs,text/vbscript .rtx,text/richtext .dlm,text/dlm .xwd,image/x-xwindowdump .pgm,image/x-portable-graymap .wbmp,image/vnd.wap.wbmp .bmp,image/bmp .crt,application/x-x509-ca-cert .ustar,application/x-ustar .tex,application/x-tex .sv4cpio,application/x-sv4cpio .tgz,application/x-compressed .cdf,application/x-cdf .vss,application/vnd.visio .cat,application/vnd.ms-pki.seccat .prx,application/octet-stream .pcz,application/octet-stream .acx,application/internet-property-stream" > </IIsMimeMap>
Now we’re coming to metabase keys you are more likely to want to configure using edit-while-running. The first is the IIsWebService key, which defines global configuration settings for the WWW service that apply to all websites running on IIS. Note the location of this node in the LM namespace.
Many of the properties contained in this key can be set in the GUI using the properties sheet for the Web Sites node. Remember, to find out what any of these properties represent (some you can guess from their names), refer to the Metabase Reference in IIS Help. I’ve noted a few interesting properties for this key in a couple of places in the following:
<IIsWebService Location ="/LM/W3SVC" AllowKeepAlive="TRUE" AnonymousUserName="IUSR_ESRV220B" AnonymousUserPass="496344627000000022000000400000003b15b816b84ce0694a3dd6e5a 1dae7f6ecf3eaf117bfaa3fe74333b07bdda92f6c0b000001000100fd8a74f690bdad557a484 49422cc55a3f187d9c4a7164865fd57d235b334d80e2464628b0379749d18387b3d30e27ee54 15ec7895fde3914f4b1cc0ea1ec62b2" AppAllowClientDebug="FALSE" AppAllowDebugging="FALSE" AppPool ApplicationDependencies="Active Server Pages;ASP Internet Data Connector;HTTPODBC Server Side Includes;SSINC WebDAV;WEBDAV" AspAllowOutOfProcComponents="TRUE" AspAllowSessionState="TRUE" AspAppServiceFlags="0" AspBufferingLimit="4194304" AspBufferingOn="TRUE" AspCalcLineNumber="TRUE" AspCodepage="0" AspDiskTemplateCacheDirectory="%windir%\system32\inetsrv\ASP Compiled Templates" AspEnableApplicationRestart="TRUE" AspEnableAspHtmlFallback="FALSE" AspEnableChunkedEncoding="TRUE" AspEnableParentPaths="FALSE" AspEnableTypelibCache="TRUE" AspErrorsToNTLog="FALSE" AspExceptionCatchEnable="TRUE" AspExecuteInMTA="0" AspKeepSessionIDSecure="0" AspLC AspLogErrorRequests="TRUE" AspMaxDiskTemplateCacheFiles="2000" AspMaxRequestEntityAllowed="204800" AspProcessorThreadMax="25" AspQueueConnectionTestTime="3" AspQueueTimeout="4294967295" AspRequestQueueMax="3000" AspRunOnEndAnonymously="TRUE" AspScriptEngineCacheMax="250" AspScriptErrorMessage="An error occurred on the server when processing the URL. Please contact the system administrator." AspScriptErrorSentToBrowser="TRUE" AspScriptFileCacheSize="500" AspScriptLanguage="VBScript" AspScriptTimeout="90" AspSessionMax="4294967295" AspSessionTimeout="20" AspTrackThreadingModel="FALSE" AuthChangeURL="/iisadmpwd/achg.asp" AuthExpiredURL="/iisadmpwd/aexp.asp" AuthExpiredUnsecureURL="/iisadmpwd/aexp3.asp" AuthFlags="AuthAnonymous | AuthNTLM" AuthNotifyPwdExpURL="/iisadmpwd/anot.asp" AuthNotifyPwdExpUnsecureURL="/iisadmpwd/anot3.asp" CGITimeout="300" CacheISAPI="TRUE" CentralBinaryLoggingEnabled="FALSE"
There’s where centralized binary logging is enabled in IIS. There’s no GUI element in IIS Manager to do this, you have to edit the metabase instead. You have to restart IIS to make this change take effect.
ConnectionTimeout="120" ContentIndexed="TRUE" DefaultDoc="Default.htm,Default.asp,index.htm"
Note the preceding format for multiple values for a property whose data type is STRING.
DirBrowseFlags="DirBrowseShowDate | DirBrowseShowTime | DirBrowseShowSize | DirBrowseShowExtension | DirBrowseShowLongDate | EnableDefaultDoc"
The preceding data type is DWORD, a 4-byte (32-bit) number. However, here it is used to define a series of 1-bit flags instead.
DownlevelAdminInstance="1"
The Metabase Reference in IIS Help says this about the preceding property: “The DownlevelAdminInstance indicates the server instance for remote administration clients.” Doesn’t tell you much, does it?
HttpErrors="400,*,FILE,C:\WINDOWS\help\iisHelp\common\400.htm 401,1,FILE,C:\WINDOWS\help\iisHelp\common\401-1.htm 401,2,FILE,C:\WINDOWS\help\iisHelp\common\401-2.htm 401,3,FILE,C:\WINDOWS\help\iisHelp\common\401-3.htm 401,4,FILE,C:\WINDOWS\help\iisHelp\common\401-4.htm 401,5,FILE,C:\WINDOWS\help\iisHelp\common\401-5.htm 401,7,FILE,C:\WINDOWS\help\iisHelp\common\401-1.htm 403,1,FILE,C:\WINDOWS\help\iisHelp\common\403-1.htm 403,2,FILE,C:\WINDOWS\help\iisHelp\common\403-2.htm 403,3,FILE,C:\WINDOWS\help\iisHelp\common\403-3.htm 403,4,FILE,C:\WINDOWS\help\iisHelp\common\403-4.htm 403,5,FILE,C:\WINDOWS\help\iisHelp\common\403-5.htm 403,6,FILE,C:\WINDOWS\help\iisHelp\common\403-6.htm 403,7,FILE,C:\WINDOWS\help\iisHelp\common\403-7.htm 403,8,FILE,C:\WINDOWS\help\iisHelp\common\403-8.htm 403,9,FILE,C:\WINDOWS\help\iisHelp\common\403-9.htm 403,10,FILE,C:\WINDOWS\help\iisHelp\common\403-10.htm 403,11,FILE,C:\WINDOWS\help\iisHelp\common\403-11.htm 403,12,FILE,C:\WINDOWS\help\iisHelp\common\403-12.htm 403,13,FILE,C:\WINDOWS\help\iisHelp\common\403-13.htm 403,15,FILE,C:\WINDOWS\help\iisHelp\common\403-15.htm 403,16,FILE,C:\WINDOWS\help\iisHelp\common\403-16.htm 403,17,FILE,C:\WINDOWS\help\iisHelp\common\403-17.htm 403,18,FILE,C:\WINDOWS\help\iisHelp\common\403.htm 403,19,FILE,C:\WINDOWS\help\iisHelp\common\403.htm 403,20,FILE,C:\WINDOWS\help\iisHelp\common\403-20.htm 404,*,FILE,C:\WINDOWS\help\iisHelp\common\404b.htm 404,2,FILE,C:\WINDOWS\help\iisHelp\common\404b.htm 404,3,FILE,C:\WINDOWS\help\iisHelp\common\404b.htm 405,*,FILE,C:\WINDOWS\help\iisHelp\common\405.htm 406,*,FILE,C:\WINDOWS\help\iisHelp\common\406.htm 407,*,FILE,C:\WINDOWS\help\iisHelp\common\407.htm 412,*,FILE,C:\WINDOWS\help\iisHelp\common\412.htm 414,*,FILE,C:\WINDOWS\help\iisHelp\common\414.htm 415,*,FILE,C:\WINDOWS\help\iisHelp\common\415.htm 500,12,FILE,C:\WINDOWS\help\iisHelp\common\500-12.htm 500,13,FILE,C:\WINDOWS\help\iisHelp\common\500-13.htm 500,15,FILE,C:\WINDOWS\help\iisHelp\common\500-15.htm 500,16,FILE,C:\WINDOWS\help\iisHelp\common\500.htm 500,17,FILE,C:\WINDOWS\help\iisHelp\common\500.htm 500,18,FILE,C:\WINDOWS\help\iisHelp\common\500.htm 500,19,FILE,C:\WINDOWS\help\iisHelp\common\500.htm"
The preceding HttpErrors property uses the MULTISZ data type, allowing multiple string values to be specified with spaces (or line breaks) in between.
IIs5IsolationModeEnabled="FALSE" InProcessIsapiApps="C:\WINDOWS\system32\inetsrv\httpext.dll C:\WINDOWS\system32\inetsrv\httpodbc.dll C:\WINDOWS\system32\inetsrv\ssinc.dll C:\WINDOWS\system32\msw3prt.dll" LogExtFileFlags="LogExtFileDate | LogExtFileTime | LogExtFileClientIp | LogExtFileUserName | LogExtFileServerIp | LogExtFileMethod | LogExtFileUriStem | LogExtFileUriQuery | LogExtFileHttpStatus | LogExtFileWin32Status | LogExtFileServerPort | LogExtFileUserAgent | LogExtFileHttpSubStatus" LogFileDirectory="C:\WINDOWS\system32\LogFiles" LogFilePeriod="1"
You might guess that the preceding property indicates that IIS create a new log file every day, and you’d be right! But if you guessed a value of "7" will create a new log every week, you’re wrong—the correct value to do this is "2" instead. Check the Metabase Reference for more information.
LogFileTruncateSize="20971520" LogInUTF8="FALSE" LogOdbcDataSource="HTTPLOG" LogOdbcPassword="496344626000000012000000400000003b15b816fb4caa69023de4e 5afdaf5f6d2f301003dd46796d884d5328d3aeb83e532e6d4dc4a109b082b6e3c69dc9ce65 7d7983e7f9a6665f59a5a2d0ec64cc9ea511f0ad8da79cbb410ddec24fc8d7e9525f6b5b011 0028" LogOdbcTableName="InternetLog" LogOdbcUserName="InternetAdmin" LogPluginCls LogType="1" MaxConnections="4294967295" MaxGlobalBandwidth="4294967295" MinFileBytesPerSec="240" PasswordChangeFlags="AuthChangeDisable | AuthAdvNotifyDisable" ScriptMaps=".asp,C:\WINDOWS\system32\inetsrv\asp.dll,5,GET,HEAD,POST,TRACE .cer,C:\WINDOWS\system32\inetsrv\asp.dll,5,GET,HEAD,POST,TRACE .cdx,C:\WINDOWS\system32\inetsrv\asp.dll,5,GET,HEAD,POST,TRACE .asa,C:\WINDOWS\system32\inetsrv\asp.dll,5,GET,HEAD,POST,TRACE .idc,C:\WINDOWS\system32\inetsrv\httpodbc.dll,5,GET,POST .shtm,C:\WINDOWS\system32\inetsrv\ssinc.dll,5,GET,POST .shtml,C:\WINDOWS\system32\inetsrv\ssinc.dll,5,GET,POST .stm,C:\WINDOWS\system32\inetsrv\ssinc.dll,5,GET,POST"
The preceding ScriptMaps property identifies which file extensions are associated with different script processors such as asp.dll for Active Server Pages, httpodbc.dll for Internet Database Connector, and so on. The property also defines which HTTP verbs are allowed for each scriptmap.
WAMUserName="IWAM_ESRV220B" WAMUserPass="496344627000000022000000400000003b15b816a44c8069473dc0e596dad5f 6b4f3e3f149bfa43ffe435ab06bdd9f2f6c0b0000010001002523216133007f603a05bcc6099 a11fec6f0e92ebae05501fb713a5ce6b074aa4fe70b8995f2ca9d57c94b909621b04235acf97 87ab7fc5b83466cbc38c51335" WebSvcExtRestrictionList="0,*.dll 0,*.exe 0,C:\WINDOWS\system32\inetsrv\asp.dll,0,ASP,Active Server Pages 0,C:\WINDOWS\system32\inetsrv\httpodbc.dll,0,HTTPODBC,Internet Data Connector 0,C:\WINDOWS\system32\inetsrv\ssinc.dll,0,SSINC,Server Side Includes 0,C:\WINDOWS\system32\inetsrv\httpext.dll,0,WEBDAV,WebDAV"
The preceding WebSvcExtRestrictionList property represents the current settings of the Web Service Extensions (WSE) node in IIS Manager.
That’s the closing bracket of the <IIsWebService> tag that started several pages ago!
<Custom Name="UnknownName_2166" Value="1" Type="DWORD" UserType="IIS_MD_UT_SERVER" Attributes="NO_ATTRIBUTES" />
Unfortunately, I have no idea what the preceding Custom property represents because a lot of metabase settings are still undocumented by Microsoft.
<Custom Name="UnknownName_9202" Value="4294967295" Type="DWORD" UserType="IIS_MD_UT_SERVER" Attributes="NO_ATTRIBUTES" /> </IIsWebService>
That’s the end of the IIsWebService key representing configuration settings for the WWW service and global settings for all websites running on IIS.
Now let’s look at the key for a particular website, namely, the Default Web Site:
<IIsWebServer Location ="/LM/W3SVC/1" AppPool DefaultDoc="Default.htm,Default.asp,index.htm,iisstart.htm" ServerBindings=":80:" ServerComment="Default Web Site" ServerSize="1" > </IIsWebServer>
The preceding key was short and sweet because of properties inheritance.
<IIsFilters Location ="/LM/W3SVC/1/Filters" AdminACL="49634462f0000000a4000000400000003b15b816894cdce9ee3d88e550da92f6d2 f3baf166bf973fc44300b048ddcb2f6c0bf739aca29375ad73f07d24a27bc9ffe2ae30ec615c d08d8b8813ff2353ddb5a48b8c6bcaee802d2b2cfad02fc3563513639dc23e5c7dcc38710955 bed070ca3459b5d1d056d816b5c731532d7edaad3c8aea36a105537c4eb0771b9bf8bfc3d080 9f81ba6fd34d6c58b8e1becdf18aa94c32f3f07334c21f5f12fcaf40a8d48f9c5157d28e11aa 5df74eaa898ae62ffee384f1715e30109d0709c597c46c0a8be018453a9ab2c73d1822a44a71 67d3932f0ec20d12d7328b760c148afb0857cccdd292a53884" > </IIsFilters> <IIsCertMapper Location ="/LM/W3SVC/1/IIsCertMapper" > </IIsCertMapper>
Although the IIsWebServer key a few lines back contained configuration information for the Default Web Site, here is another key relating to this site that specifies application settings and the location home directory for the site. Note the location of this key "/LM/W3SVC/1/ROOT" within the metabase hierarchy.
<IIsWebVirtualDir Location ="/LM/W3SVC/1/ROOT" AccessFlags="AccessRead | AccessScript" AppFriendlyName="Default Application" AppIsolated="2"
You’d be right if you thought "0" meant in-process, "1" out of process, and "2" pooled process. Or did you get 1 and 2 reversed? This property is probably here only for backward compatibility reasons as websites can no longer run in-process on IIS 6. Looking up this property in IIS Help reveals that you should consider it read-only and should not try to configure it manually.
AppPool AppRoot="/LM/W3SVC/1/ROOT" Path="c:\inetpub\wwwroot" > </IIsWebVirtualDir>
Settings for the following IIsApplicationPools key apply to all application pools running on the IIS machine:
<IIsApplicationPools Location ="/LM/W3SVC/AppPools" AdminACL="49634462f0000000a4000000400000003b15b816894cdce9ee3d88e550da92f6d2 f3baf166bf973fc44300b048ddcb2f6c0bf739a7a29375ad73f07d24a27bc9ffe2ae30ec615c d0868b8813ff2353ddb5a48b8c6bcaee802d2b2cfadb2fc3563513639dc23e5c7dcc38710955 bed070ca3459b5d1d056d816b5c731532d7edaad3c8aea36a105537c4eb0771b9bf8bfc3d080 9f81ba6fd34d6c58b8e1becdf18aa94c32f3f07334c21f5f12fcaf40a8d48f9c5157d28e11fa 36354cf9e4a0252865d4169694e9a718803cee803d0ca0d0b45fe6b447a3f7f069e83296d7f5 86eef4bde1e87a465253bbe5e8f69553c432a7b85e09452f6b" AppPoolIdentityType="2" AppPoolQueueLength="1000"
Here’s where you can configure request queuing limits for the HTTP Listener, also called the Universal Listener. Exceeding this number of queued requests will cause an HTTP 503 error to be returned to clients.
CPULimit="0"
There’s where you can configure the maximum amount (in thousandths of a percent) of CPU time that worker processes can consume, also called CPU throttling, as we discussed in Chapter 12, “Performance Tuning and Monitoring.” A value of "0" means CPU throttling is disabled, which it is by default.
CPUResetInterval="5" DisallowOverlappingRotation="FALSE"
The preceding setting can be modified to enable overlapping recycling of worker processes, which is disabled by default.
DisallowRotationOnConfigChange="FALSE" IdleTimeout="20" LoadBalancerCapabilities="2" LogEventOnRecycle="AppPoolRecycleTime | AppPoolRecycleMemory | AppPoolRecyclePrivateMemory" MaxProcesses="1" OrphanWorkerProcess="FALSE" PeriodicRestartMemory="0" PeriodicRestartPrivateMemory="0" PeriodicRestartRequests="0" PeriodicRestartTime="1740" PingInterval="30" PingResponseTime="90" PingingEnabled="TRUE" RapidFailProtection="TRUE" RapidFailProtectionInterval="5" RapidFailProtectionMaxCrashes="5" SMPAffinitized="FALSE" SMPProcessorAffinityMask="4294967295"
Specific worker processes can be assigned to specific CPUs on an SMP machine using the preceding two properties, a feature called CPU affinity, as discussed earlier.
ShutdownTimeLimit="90" StartupTimeLimit="90" > </IIsApplicationPools>
Now you have a key for a specific application pool, the DefaultAppPool. Note that this key has no properties other than Location because, by default, it inherits all its settings from the IIsApplicationPools node above it.
<IIsApplicationPool Location ="/LM/W3SVC/AppPools/DefaultAppPool" > </IIsApplicationPool> <IIsFilters Location ="/LM/W3SVC/Filters" AdminACL="49634462f0000000a4000000400000003b15b816894cdce9ee3d88e550da92f6d2 f3baf166bf973fc44300b048ddcb2f6c0bf739aca29375ad73f07d24a27bc9ffe2ae30ec615c d08d8b8813ff2353ddb5a48b8c6bcaee802d2b2cfad02fc3563513639dc23e5c7dcc38710955 bed070ca3459b5d1d056d816b5c731532d7edaad3c8aea36a105537c4eb0771b9bf8bfc3d080 9f81ba6fd34d6c58b8e1becdf18aa94c32f3f07334c21f5f12fcaf40a8d48f9c5157d28e11aa 5df74eaa898ae62ffee384f1715e30109d0709c597c46c0a8be018453a9ab2c73d1822a44a71 67d3932f0ec20d12d7328b760c148afb0857cccdd292a53884" FilterLoadOrder="" > </IIsFilters> <IIsFilter Location ="/LM/W3SVC/Filters/Compression" > </IIsFilter> <IIsCompressionScheme Location ="/LM/W3SVC/Filters/Compression/deflate" HcCompressionDll="%windir%\system32\inetsrv\gzip.dll" HcCreateFlags="0" HcDoDynamicCompression="TRUE" HcDoOnDemandCompression="TRUE" HcDoStaticCompression="FALSE" HcDynamicCompressionLevel="0" HcFileExtensions="htm html txt" HcOnDemandCompLevel="10" HcPriority="1" HcScriptFileExtensions="asp dll exe" > </IIsCompressionScheme> <IIsCompressionScheme Location ="/LM/W3SVC/Filters/Compression/gzip" HcCompressionDll="%windir%\system32\inetsrv\gzip.dll" HcCreateFlags="1" HcDoDynamicCompression="TRUE" HcDoOnDemandCompression="TRUE" HcDoStaticCompression="TRUE" HcDynamicCompressionLevel="0" HcFileExtensions="htm html txt" HcOnDemandCompLevel="10" HcPriority="1" HcScriptFileExtensions="asp dll exe" > </IIsCompressionScheme> <IIsCompressionSchemes Location ="/LM/W3SVC/Filters/Compression/Parameters" HcCacheControlHeader="maxage=86400" HcCompressionBufferSize="8192" HcCompressionDirectory="%windir%\IIS Temporary Compressed Files" HcDoDiskSpaceLimiting="FALSE" HcDoDynamicCompression="FALSE" HcDoOnDemandCompression="TRUE" HcDoStaticCompression="FALSE" HcExpiresHeader="Wed, 01 Jan 1997 12:00:00 GMT" HcFilesDeletedPerDiskFree="256" HcIoBufferSize="8192" HcMaxDiskSpaceUsage="100000000" HcMaxQueueLength="1000" HcMinFileSizeForComp="1" HcNoCompressionForHttp10="TRUE" HcNoCompressionForProxies="TRUE" HcNoCompressionForRange="FALSE" HcSendCacheHeaders="FALSE" > </IIsCompressionSchemes>
The following key contains more settings global to all websites running on IIS:
<IIsWebInfo Location ="/LM/W3SVC/Info" AdminACL="49634462a000000058000000400000003b15b816894cdce95a3d88e584da92f6d2 f3baf166bf973fc4434cb04dddcb2f6c0bfb398ca29775ad70f07d24a27bc9cce2ae30cc6348 d007898813fe2253d895a48b895fc8ee802c2908fa5b2fc3531416639de23c5c7874cdc802d1 6f5faac05cafeba90944485c56bad32d7c36da2e0b7a2661dfecb6d0b431041e1b74fa75d5f5 6df4e802eeeffbafd80de2429a8e08b33e54108184" CustomErrorDescriptions="400,0,Bad Request,,0 401,1,Unauthorized,Logon failed,1 401,2,Unauthorized,Logon failed due to server configuration,1 401,3,Unauthorized,Unauthorized due to ACL on resource,1 401,4,Unauthorized,Authorization failed by filter,1 401,5,Unauthorized,Authorization failed by ISAPI/CGI app,1 401,7,Unauthorized,Denied due to URL Authorization policy,0 403,1,Forbidden,Execute access denied,0 403,2,Forbidden,Read access denied,0 403,3,Forbidden,Write access denied,0 403,4,Forbidden,SSL required,0 403,5,Forbidden,SSL128 required,0 403,6,Forbidden,IP address rejected,0 403,7,Forbidden,Client certificate required,0 403,8,Forbidden,Site access denied,0 403,9,Forbidden,Too many users,0 403,10,Forbidden,Invalid Configuration,0 403,11,Forbidden,Password Change,0 403,12,Forbidden,Mapper Denied Access,0 403,13,Forbidden,Client certificate revoked,0 403,14,Forbidden,Directory Listing Denied,0 403,15,Forbidden,Client Access Licenses Exceeded,0 403,16,Forbidden,Client certificate untrusted or ill-formed,0 403,17,Forbidden,Client certificate has expired or is not yet valid,0 403,18,Forbidden,Cannot execute request from this application pool,0 403,19,Forbidden,CGI Access denied,0 403,20,Forbidden,Passport Login failed,0 404,0,Not Found,,0 404,2,Not Found,Denied due to Lockdown Policy,0 404,3,Not Found,Denied due to MIMEMAP Policy,0 405,0,Method Not Allowed,,0 406,0,Not Acceptable,,0 407,0,Proxy Authentication Required,,1 412,0,Precondition Failed,,0 414,0,Request-URI Too Long,,0 415,0,Unsupported Media Type,,0 500,0,Internal Server Error,,0 500,12,Internal Server Error,Application restarting,0 500,13,Internal Server Error,Server too busy,0 500,15,Internal Server Error,Direct requests for GLOBAL.ASA forbidden,0 500,16,Internal Server Error,UNC Access Error,0 500,17,Internal Server Error,URL Authorization store not found,0 500,18,Internal Server Error,URL Authorization store cannot be opened,0 500,19,Internal Server Error,Bad file metadata,0 500,100,Internal Server Error,ASP error,0 501,0,Not Implemented,,0 502,0,Bad Gateway,,1" LogModuleList="NCSA Common Log File Format,Microsoft IIS Log File Format,W3C Extended Log File Format,ODBC Logging" MD_SERVER_CAPABILITIES="129983" MD_SERVER_PLATFORM="1" MajorIIsVersionNumber="6" MinorIIsVersionNumber="0" > </IIsWebInfo>
Here are some keys used for legacy compatibility; don’t change anything in them:
<IIsConfigObject Location ="/LM/W3SVC/Info/Templates" > </IIsConfigObject> <IIsWebServer Location ="/LM/W3SVC/Info/Templates/Public Web Site" ServerComment="Allows all users to browse static and dynamic content." > </IIsWebServer> <IIsWebVirtualDir Location ="/LM/W3SVC/Info/Templates/Public Web Site/Root" AccessFlags="AccessRead | AccessScript" AuthFlags="AuthAnonymous" IPSecurity="" > </IIsWebVirtualDir> <IIsWebServer Location ="/LM/W3SVC/Info/Templates/Secure Web Site" ServerComment="Allows users with a Windows account to view static and dynamic content." > </IIsWebServer> <IIsWebVirtualDir Location ="/LM/W3SVC/Info/Templates/Secure Web Site/Root" AccessFlags="AccessRead | AccessScript" AuthFlags="AuthBasic | AuthNTLM | AuthMD5" IPSecurity="" > </IIsWebVirtualDir>
And that’s the end of metabase properties. The XML document now ends with two closing tags to complete the elements defined at the beginning of the file.
</MBProperty> </configuration>
And that completes our tour of the XML metabase!
Modifying the MetaBase.xml File Using IIS Manager
Let’s make a significant change to the metabase by creating a new website using IIS Manager. Create a new site having the name New Site with IP address 172.16.11.221 and home directory C:\stuff. Leave the rest of the settings in the Web Site Creation Wizard at their defaults.
Now right-click the servername node in IIS Manager, and select All Tasks and then Save Configuration To Disk. This writes the changes made to the in-memory metabase to the metabase configuration file MetaBase.xml. Now open Metabase.xml using Notepad, search for “New Site,” and you’ll discover that three new keys have been added to the metabase:
<IIsWebServer Location ="/LM/W3SVC/388907640"
The new key is located as a child node of the W3SVC node in the LM namespace. The key is uniquely identified by a number randomly generated by IIS and assigned to the new website.
AuthFlags="0" ServerAutoStart="TRUE" ServerBindings="172.16.11.221:80:" ServerComment="New Site" > </IIsWebServer> <IIsFilters Location ="/LM/W3SVC/388907640/filters" AdminACL="49634462f0000000a400000040000000a9002a570dc9357e6d84f3ae0e023613af 861eebb31cab956b85e79c6da1187cf9815cfe906e003f40451e6d38093390e60d74a2b7e5f8 435d4446613bb1af1d7733d1421669a15a1222f65c08fcb6b39414fc88b9625675273685b507 1a7b466bf6d67b5ece76505e59b7ceca0d14fe36815866d42ac94258895db4dba1c23cfafcc0 db2d2ab69aa2785aaff31482b5817982836c645b7baf337685ffd8311fd2faabd50068dbd0aa 5df74eaa898ae62ffee384f1715e30109d0709c597c46c0a8be018453a9ab2c73d1822a44a71 67d3932f0ec20d12d7328b760c148afb0857cccdd292a53884" > </IIsFilters> <IIsWebVirtualDir Location ="/LM/W3SVC/388907640/root"
Interestingly, the location for this key has “root” in lowercase, while the Default Web Site uses “ROOT” instead. A bug or a “feature”?
AccessFlags="AccessRead | AccessScript" AppFriendlyName="Default Application" AppIsolated="2" AppRoot="/LM/W3SVC/388907640/Root" AuthFlags="AuthAnonymous | AuthNTLM" DirBrowseFlags="DirBrowseShowDate | DirBrowseShowTime | DirBrowseShowSize | DirBrowseShowExtension | DirBrowseShowLongDate | EnableDefaultDoc" Path="C:\stuff" > </IIsWebVirtualDir>
Summary of MetaBase.xml Structure
I’ll conclude my overview of the logical structure of the metabase configuration file by summarizing the hierarchical nature of this structure two ways: by the KeyType property of metabase keys and by the Location attribute of the keys. I’ll use the updated version of your MetaBase.xml file that contains information about the new website you just created.
Key Hierarchy
First, here is a representation of the hierarchy of keys found in your sample MetaBase.xml file, omitting all XML except for the elements at the start and end of the document. Repeated keys are indicated by ellipses (". . .").
<?xml version ="1.0"?> <configuration xmlns="urn:microsoft-catalog:XML_Metabase_V54_0"> <MBProperty> IIS_Global IIS_ROOT IIsComputer IIsConfigObject IIsConfigObject... IIsLogModules IIsCustomLogModule IIsCustomLogModule... IIsLogModule IIsLogModule... IIsMimeMap IIsWebService IIsWebServer IIsFilters IIsCertMapper IIsWebVirtualDir IIsWebServer IIsFilters IIsWebVirtualDir IIsApplicationPools IIsApplicationPool IIsFilters IIsFilter IIsCompressionScheme IIsCompressionScheme IIsCompressionSchemes IIsWebInfo IIsConfigObject IIsWebServer IIsWebVirtualDir IIsWebServer IIsWebVirtualDir </MBProperty> </configuration>
That’s not very informative, but it does give you a general map of keys in the metabase and where they’re located with respect to each other, so it may be useful to refer to it on occasion. Besides, it’s not very hierarchical because, apart from the first two XML elements, there is no nesting of keys in the metabase.
Location Hierarchy
The real hierarchy for the metabase is the namespace of Location attributes for keys, and following is a representation of this hierarchy:
. / /LM /LM/IISADMIN /LM/IISADMIN/EXTENSIONS /LM/IISADMIN/EXTENSIONS/DCOMCLSIDS /LM/IISADMIN/PROPERTYREGISTRATION /LM/Logging /LM/Logging/Custom Logging /LM/Logging/Custom Logging/Date /LM/Logging/Custom Logging/Extended Properties /LM/Logging/Custom Logging/Extended Properties/Bytes Received /LM/Logging/Custom Logging/Extended Properties/Bytes Sent /LM/Logging/Custom Logging/Extended Properties/Client IP Address /LM/Logging/Custom Logging/Extended Properties/Cookie /LM/Logging/Custom Logging/Extended Properties/Host /LM/Logging/Custom Logging/Extended Properties/Method /LM/Logging/Custom Logging/Extended Properties/Protocol Status /LM/Logging/Custom Logging/Extended Properties/Protocol Substatus /LM/Logging/Custom Logging/Extended Properties/Protocol Version /LM/Logging/Custom Logging/Extended Properties/Referer /LM/Logging/Custom Logging/Extended Properties/Server IP /LM/Logging/Custom Logging/Extended Properties/Server Name /LM/Logging/Custom Logging/Extended Properties/Server Port /LM/Logging/Custom Logging/Extended Properties/Service Name /LM/Logging/Custom Logging/Extended Properties/Time Taken /LM/Logging/Custom Logging/Extended Properties/URI Query /LM/Logging/Custom Logging/Extended Properties/URI Stem /LM/Logging/Custom Logging/Extended Properties/User Agent /LM/Logging/Custom Logging/Extended Properties/User Name /LM/Logging/Custom Logging/Extended Properties/Win32 Status /LM/Logging/Custom Logging/Time /LM/Logging/Microsoft IIS Log File Format /LM/Logging/NCSA Common Log File Format /LM/Logging/ODBC Logging /LM/Logging/W3C Extended Log File Format /LM/MimeMap /LM/W3SVC /LM/W3SVC/1 /LM/W3SVC/1/Filters /LM/W3SVC/1/IIsCertMapper /LM/W3SVC/1/ROOT /LM/W3SVC/388907640 /LM/W3SVC/388907640/filters /LM/W3SVC/388907640/root /LM/W3SVC/AppPools /LM/W3SVC/AppPools/DefaultAppPool /LM/W3SVC/Filters /LM/W3SVC/Filters/Compression /LM/W3SVC/Filters/Compression/deflate /LM/W3SVC/Filters/Compression/gzip /LM/W3SVC/Filters/Compression/Parameters /LM/W3SVC/Info /LM/W3SVC/Info/Templates /LM/W3SVC/Info/Templates/Public Web Site /LM/W3SVC/Info/Templates/Public Web Site/Root /LM/W3SVC/Info/Templates/Secure Web Site /LM/W3SVC/Info/Templates/Secure Web Site/Root </MBProperty> </configuration>
This representation is much easier to read than the previous one that used KeyType. Here you can clearly see where the settings for the Default Web Site and New Site are located and get a clear idea of the hierarchical nature of the metabase. The big picture of the metabase is gained by combining the two structures developed in the preceding sections—I’ll leave that as an exercise for you to try.
|
|