What does the request status include

Microsoft Internet Information Services (IIS) 7.0 - The

Microsoft Internet Information Services (IIS) 7.0 - The
Mike Volodarsky Olga Londer Brett Hill Bernard Cheah Steve Schofield Carlos Aguilar Mares Kurt Meyer Microsoft IIS Team Microsoft Internet Information Services (IIS) 7.0 - The Technical Reference Microsoft Internet Information Services (IIS) 7.0 - The Technical Reference, © 2008 Microsoft Press Germany, ISBN 978-3- 86645-924-3 This book is the German translation of: Internet Information Services 7.0 Resource Kit Microsoft Press, Redmond, Washington 98052-6399 Copyright 2009 Microsoft Corporation The program material contained in this book does not imply any obligation or guarantee of any kind. The author, translator and the publisher consequently assume no responsibility and will not accept any consequential or other liability that may arise in any way from the use of this program material or parts thereof. The work including all parts is protected by copyright. Any use outside the narrow limits of copyright law without the consent of the publisher is inadmissible and punishable by law. This applies in particular to reproductions, translations, microfilming and storage and processing in electronic systems. The names of companies, organizations, products, domains, people, places, events as well as e-mail addresses and logos used in the examples are fictitious unless otherwise stated. Any resemblance to actual companies, organizations, products, domains, people, places, events, email addresses, and logos is purely coincidental. 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 10 09 08 ISBN 978-3-86645-5-924-3, also part of Microsoft Windows Server 2008 - The Technical Reference (ISBN 978-3-86645- 919-9) © Microsoft Press Deutschland (a division of Microsoft Deutschland GmbH) Konrad-Zuse-Str. 1, D-85716 Unterschleißheim All rights reserved Translation into German: Detlef Johannis, Uwe Thiemann Proofreading: Karin Baeyens, Dorothee Klein, Siegen Typesetting: Cordula Winkler, mediaService, Siegen (www.media-service.tv) Cover design: Hommer Design GmbH, Haar (www.HommerDesign.com) Production, printing and binding: Kösel, Krugzell (www.KoeselBuch.de) Microsoft Internet Information Services (IIS) 7.0 - The technical reference, © 2008 Microsoft Press Germany, ISBN 978-3-86645-924- 3 III Table of Contents Acknowledgments. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . XV introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . XVII What is new in IIS 7.0? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Overview of the book. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Special markings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Reading aids. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Inserts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Command line examples. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Companion CD Contents. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Find more content online. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Technical reference support policy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . XVII XIX XIX XIX XX XX XX XXI XXI Part I Basics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Chapter 1 Introducing IIS 7.0. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Overview of IIS 7.0. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . What is new in IIS 7.0? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The web server core. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Management tools. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Diagnosis. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Windows Process Activation Service. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Application compatibility. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Basic administrative tasks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Build websites. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Build applications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Create virtual directories. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Create application pools. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Assign an application to an application pool. . . . . . . . . . . . . . . . . . . . . . . . . . IIS 7.0 features on Windows Server 2008 and Windows Vista. . . . . . . . . . . . . . . . . . . . Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Additional Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 5 5 8 10 13 14 15 15 15 17 19 20 21 22 26 27 Chapter 2 Basics of the IIS 7.0 architecture. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 Overview of the IIS 7.0 architecture. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . IIS 7.0 core components. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . HTTP.sys. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . WWW publishing service. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Windows Process Activation Service. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 33 33 35 37 Microsoft Internet Information Services (IIS) 7.0 - The Technical Reference, © 2008 Microsoft Press Germany, ISBN 978-3-86645-924-3 IV Table of Contents Configuration Storage. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Work processes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Request processing in the application pool. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Classic mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The integrated .NET mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Scope of validity of modules. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Module order. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Processing of non-HTTP requests. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Additional Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 40 42 43 45 50 51 52 54 55 Chapter 3 Understanding the modular basis. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 concepts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The ideas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Module types. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Modules and configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Main advantages. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Power . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Expandability. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Integrated modules. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Additional Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 58 58 59 61 61 63 63 64 65 65 Chapter 4 Understanding the configuration system. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 Overview of the configuration system. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Configuration file hierarchy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Configuration file syntax. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The IIS 7.0 configuration system and the IIS 6.0 metabase. . . . . . . . . . . . . . . . . . . . IIS 7.0 and the .NET configuration systems. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Configuration editing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Selection of the configuration location. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Define configurations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Understand configuration errors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Configuration management. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Save the configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Working with the configuration history. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Exporting and importing configurations. . . . . . . . . . . . . . . . . . . . . . . . . . . . Configuration delegation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . One configuration for several servers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Additional Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 69 73 80 83 84 85 86 90 93 93 94 95 96 106 111 112 Microsoft Internet Information Services (IIS) 7.0 - The Technical Reference, © 2008 Microsoft Press Germany, ISBN 978-3-86645-924-3 Table of Contents Part II Deployment. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V 113 Chapter 5 Installing IIS 7.0. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 Planning for Installation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Installation scenarios for IIS 7.0. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Options for installing IIS 7.0. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Work with the server manager. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Use the package manager. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Use ServerManagerCMD. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Answer files for unattended installations. . . . . . . . . . . . . . . . . . . . . . . . . . . . Sysprep / New setup system. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Automatic installations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Windows Server 2008 setup for optional features. . . . . . . . . . . . . . . . . . . . . . . . . . . After installation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Folders and contents. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Registration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Verification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Troubleshoot installation problems. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Event logs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . IIS 7.0 protocol. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Other logging options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Remove IIS 7.0. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The user interface in Windows Server 2008 and Windows Vista. . . . . . . . . . The command line method. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Additional Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 117 129 129 130 131 133 135 136 136 137 138 139 139 139 140 140 141 141 142 142 144 145 146 Part III Administration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141 Chapter 6 Using IIS Manager. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141 Overview of the IIS Manager. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Start the IIS manager. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The user interface of the IIS manager. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Navigation bar. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The Connections area. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Workspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The Actions area. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Understand features. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The assignment of features to modules. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Configuration storage location. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Scope of the features. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Adaptation and expandability of the IIS 7.0 manager. . . . . . . . . . . . . . . . . . . . . . . . . . . . . Remote administration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Additional Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149 152 153 155 155 158 171 171 172 174 176 177 180 181 182 Microsoft Internet Information Services (IIS) 7.0 Technical Reference, © 2008 Microsoft Press Germany, ISBN 978-3-86645-924-3 VI Table of Contents Chapter 7 Using Command Line Tools. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173 Using Command Line Administration Tools. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Appcmd.exe. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Getting started with appcmd. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The syntax of Appcmd. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Supported objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Use the help. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Understand the output from Appcmd. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . General parameters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Use range operators. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Avoid common mistakes when working with Appcmd. . . . . . . . . . . . . . . . . . . . . . . . . Use the basic verbs: List, Add, Set and Delete. . . . . . . . . . . . . . . . . . . . . . . . . . . . List and find objects with the List command. . . . . . . . . . . . . . . . . . . . . . . . . . Create objects with the add-verb. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Change existing objects with the set verb. . . . . . . . . . . . . . . . . . . . . . . . . Remove objects with the delete verb. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Working with the configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . View configurations with the List Config command. . . . . . . . . . . . . . . . . . . . . . . . Set configurations with the Set Config command. . . . . . . . . . . . . . . . . . . . . . . . . . Manage the configuration delegation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Manage configuration backups. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . With applicationsvirtual directories and application pools. . . . . . . . . . Work with web server modules. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Examine executed work processes and requirements. . . . . . . . . . . . . . . . . . . . . . . List running IIS worker processes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . List currently running requirements. . . . . . . . . . . . . . . . . . . . . . . . . . . . Work with request failure tracing. . . . . . . . . . . . . . . . . . . . . . . . . . Enable tracing for request failures. . . . . . . . . . . . . . . . . . . . . . . Establish trace rules for request failures. . . . . . . . . . . . . . . . . . . . . Search the trace logs for request errors. . . . . . . . . . . . . . . Microsoft.Web.Administration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Create sites with MWA. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Create application pools with MWA. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Define the configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Windows PowerShell and IIS 7.0. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . WMI provider. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . COM objects for IIS 7.0 configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Additional Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183 185 186 187 188 189 191 194 195 196 196 196 198 198 199 200 201 202 206 206 207 208 208 208 209 210 210 211 213 215 215 216 217 218 219 219 220 220 Chapter 8 Remote Management. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221 The IIS manager. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Web administration service. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Installation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . WMSvc configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222 222 223 224 Microsoft Internet Information Services (IIS) 7.0 Technical Reference, © 2008 Microsoft Press Germany, ISBN 978-3-86645-924-3 Table of Contents VII Managing Remote Administration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Work with remote administration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Troubleshooting. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Logging. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Additional Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232 240 243 245 248 248 Chapter 9 Administering Web Sites. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249 Web Sites, Applications, Virtual Directories, and Application Pools. . . . . . . . . . . . . . Websites. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Applications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Virtual directories. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Application pools. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Administrative tasks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Add a new website. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Configure the bindings of a website. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Restrict website usage. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Configure website logging and tracing for request errors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Start and stop websites. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Manage virtual directories. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Add a new virtual directory. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Configure virtual directories. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Search for virtual directories. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Manage remote content. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Configure applications to work with remote content. . . . . . . . . . . . . . . . . . Select the security model for accessing remote content. . . . . . . . . . . . . . Configure fixed credentials for access to remote content. . . . . . Grant access to remote content. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Additional Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249 250 252 254 254 256 256 259 262 264 265 266 266 268 271 272 273 274 276 276 277 278 Chapter 10 Managing Applications and Application Pools. . . . . . . . . . . . . . . . . . . . 279 Managing web applications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Build web applications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . List web applications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Manage application pools. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Application Pool Considerations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Add a new application pool. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Manage application pool identities. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Advanced application pool configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Manage work processes and requirements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Monitor work processes and requirements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Additional Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279 280 285 287 288 290 292 296 302 302 306 307 Microsoft Internet Information Services (IIS) 7.0 - The Technical Reference, © 2008 Microsoft Press Germany, ISBN 978-3-86645-924-3 VIII Table of Contents Chapter 11 Hosting Application Development Frameworks. . . . . . . . . . . . . . . . . . . . . 309 IIS as an application development platform. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Support application frameworks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Supported application frameworks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Host ASP.NET applications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Understand integrated and classic ASP.NET modes. . . . . . . . . . . . . . . . Run multiple versions of ASP.NET at the same time. . . . . . . . . . . . . . . . . . . . . . . . . . Install ASP.NET. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Deploy ASP.NET applications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Additional deployment considerations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Host ASP applications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Install ASP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Deploy ASP applications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Additional deployment considerations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Host PHP applications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Deploy PHP applications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Additional deployment considerations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Enable application frameworks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Configure the processing of new static files. . . . . . . . . . . . . . . . . . . Deploy frameworks based on native IIS 7.0 modules. . . . . . . . . . . Deploy frameworks based on ASP.NET handlers. . . . . . . . . . . . . . . . . . . . Provide frameworks based on ISAPI extensions. . . . . . . . . . . . . . . . . . . Provide frameworks that work with FastCGI. . . . . . . . . . . . . . . . . . . . . . . . . . . . . Provide frameworks that work with CGI. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Additional Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309 310 312 313 314 316 318 320 325 327 327 328 329 330 331 335 337 338 340 341 342 342 346 348 348 Chapter 12 Administering Web Server Modules. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349 IIS 7.0 Extensibility. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The IIS 7.0 extensibility architecture at a glance. . . . . . . . . . . . . . . . . . . . . . . . Manage extensibility. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Web server expandability at runtime. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . What is a module? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Install modules. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . General module administration tasks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Install and manage managed modules with the IIS Manager. . . . . . . . . . . . . . Create and manage handler mappings with the IIS Manager. . . . . . . . . . . . . . Install and manage managed modules with Appcmd. . . . . . . . . . . . . . . . . . . . . Create and manage handler mappings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Secure web server modules. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Additional Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349 350 352 353 353 359 370 377 380 384 388 390 399 400 Microsoft Internet Information Services (IIS) 7.0 - The Technical Reference, © 2008 Microsoft Press Germany, ISBN 978-3-86645-924-3 Table of Contents IX Chapter 13 Managing Configuration and User Interface Extensions . . . . . . . . 401 Overview of the management stack. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Manage configuration extensions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Configuration section schemes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Declare configuration sections. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Install new configuration sections. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Save configuration sections. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Manage administrative extensions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . How administrative extensions work. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Install administrative extensions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Secure administrative extensions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Manage IIS Manager Extensions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . How IIS Manager Extensions work. . . . . . . . . . . . . . . . . . . . . . . . . . Install IIS Manager Extensions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Back up IIS Manager Extensions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Additional Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401 403 405 407 410 411 415 417 418 418 419 420 422 422 425 425 Chapter 14 Implementing Security Strategies. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427 Security Changes in IIS 7.0. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Reduce the attack surface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Reduce the attack surface of the application. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Configure applications to use the lowest possible permissions. . . . Use a low-privileged application pool identity. . . Grant NTFS permissions for minimum access. . . . . . . . . . . . . . . . . . . . . . . Limiting the trustworthiness of ASP.NET applications. . . . . . . . . . . . Isolate applications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Implement access control. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . IP and domain restrictions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Request filtering. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Authorization. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Authorization based on NTFS ACLs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . URL authorization. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Authentication. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Anonymous authentication. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Basic authentication. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Digest authentication. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Windows authentication. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Authentication through client certificate mappings. . . . . . . . . . . . . . . . . . . . . . . . . . . Authentication using IIS client certificate mappings. . . . . . . . . . . . . . . . . . . . . . . . UNC authentication. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Understand the authentication delegation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Secure communication with SSL (Secure Sockets Layer). . . . . . . . . . . . . . . . . . . . . . . Configure SSL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Require SSL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Client certificates. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 428 430 440 445 446 448 450 451 453 455 457 461 462 464 468 470 472 474 475 479 481 485 487 488 489 490 492 Microsoft Internet Information Services (IIS) 7.0 - The Technical Reference, © 2008 Microsoft Press Germany, ISBN 978-3-86645 -924-3 X Table of contents Backing up the configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Restricting access to the configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . Back up sensitive configurations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Control the configuration delegation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Define the configuration to be delegated. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Additional Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 493 494 498 503 503 507 507 Part IV Troubleshooting and performance tuning. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 509 Chapter 15 Logging. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 511 What's new? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The Internet Information Services Manager. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The XML configuration schema for logging. . . . . . . . . . . . . . . . . . . . . . . Configuration options for central logging. . . . . . . . . . . . . . . . . . . . . . . . . . Default configuration for new sites. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Configuration options to disable HTTP logging. . . . . . . . . . . . . Default location of the log files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . UTF-8 encoding. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . New status codes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Administrative service. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Log file formats,that haven't changed. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Central logging. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . W3C format for central logging. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Binary format for central logging. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Remote logging. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Set up remote logging using Internet Information Services Manager. . . Set up remote logging with Appcmd. . . . . . . . . . . . . . . . . . . . . . . . . . . . Remote logging using the FTP 7.0 Publishing Service. . . . . . . . . . . . . . . . . . . . . Custom logging. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Configure IIS logging. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Internet Information Services Manager. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Appcmd. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Appcmd advanced operations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Windows PowerShell. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Http.sys logging. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Application logging. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Process reuse logging. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ASP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ASP.NET. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . IIS events. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Folder compression. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Log analysis with log parser. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Additional Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 511 512 513 514 514 515 515 515 516 516 516 517 517 517 517 518 520 520 521 523 523 526 528 531 532 532 532 533 533 534 534 535 536 536 Microsoft Internet Information Services (IIS) 7.0 - The Technical Reference, © 2008 Microsoft Press Germany , ISBN 978-3-86645-924-3 Table of Contents XI Chapter 16 Tracing and Troubleshooting. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 537 Use tracing and diagnostics to troubleshoot problems. . . . . . . . . . . . . . . . . . . . Install the FRT module. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Activate and configure the FRT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Read the FRT logs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Integrate tracing and ASP.NET. . . . . . . . . . . . . . . . . . . . . . . . . . . . . Performance aspects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Troubleshooting. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Apply a procedure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Working with tools and utilities. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Troubleshoot HTTP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Eliminate common problems. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . IIS 6.0 administration programs are not installed. . . . . . . . . . . . . . . . . . . . . . . . . . SSl is not activated. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Unexpected reuse. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Crashes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Website unavailable. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Authentication failure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Slow response or stuck server. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Additional Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 538 538 539 545 550 551 552 552 554 567 574 574 574 574 575 575 575 575 575 576 Chapter 17 Optimizing Performance. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 577 Finding a compromise between safety and performance. . . . . . . . . . . . . . . . . . . . . . . . Measure the load. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Authentication. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . SSL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Processor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Random access memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Hard drives. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Network. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Application tier performance counters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64-bit mode and 32-bit mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Optimizing the configuration from a performance perspective. . . . . . . . . . . . . . . . . . . . . . . . . . . . . Server level. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . IIS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Optimize the configuration for the load type. . . . . . . . . . . . . . . . . . . . . . . . . . Server-side tools. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . System monitoring. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . WCAT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Reliability and performance monitoring. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FRT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Event Viewer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . System Center Operations Manager 2007. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 577 578 582 583 584 588 591 593 596 600 601 602 603 603 604 613 615 615 615 616 616 616 Microsoft Internet Information Services (IIS) 7.0 - The Technical Reference, © 2008 Microsoft Press Germany, ISBN 978-3-86645-924-3 XII Table of contents Scalability. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Design phase. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . More computers or more powerful computers? . . . . . . . . . . . . . . . . . . . . . . . . . . . . Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Additional Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 617 617 617 620 621 Part V Appendices. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 625 Appendix A HTTP Error Codes in IIS 7.0. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 625 Appendix B IIS 7.0 Error Messages. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 631 HTTP error in IIS 7.0. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Configuring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Sub-status codes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Example of a sub-status code. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Custom errors in different languages. . . . . . . . . . . . . . . . . . . . . . . . . . . Custom bug options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Run a url. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Redirect the request. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 632 634 634 635 635 636 636 637 Appendix C List of IIS 7.0 modules. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 639 native modules. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Managed modules. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 639 647 Appendix D Order of the modules. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 651 Appendix E IIS 7.0 Default Settings and Time Limits / Thresholds. . . . . . . . . . . . . . 655 ASP.NET. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . IIS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Administration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Application pool default settings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 655 661 680 682 Appendix F IIS 7.0 and 64-bit Windows. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 685 Windows Server 2008 x64. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Configure a 32-bit application on a 64-bit version of Microsoft Windows. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 685 686 Appendix G Mapping Internet Information Services Manager Features and Configuration Sections. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 689 ASP.NET. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . IIS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Administration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 689 690 692 Appendix H Mapping between IIS 6.0 metabase and IIS 7.0 configuration. . . . . . . . . . 693 Microsoft Internet Information Services (IIS) 7.0 Technical Reference, © 2008 Microsoft Press Germany, ISBN 978-3-86645-924-3 Table of Contents XIII Appendix I Shared Hosting with IIS 7.0. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 707 Implementing Process Gating. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Working with the command line. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Configuration changes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Enable the dynamic idle timeout threshold. . . . . . . . . . . . . . . . . . Working with the command line. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Configuration changes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 707 708 709 709 711 712 Appendix J Performing Administration Tasks in Internet Information Services Manager. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 713 The authors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 719 Index. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 721 System Requirements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 735 Microsoft Internet Information Services (IIS) 7.0 - The Technical Reference, © 2008 Microsoft Press Germany, ISBN 978-3-86645-924-3 Microsoft Internet Information Services (IIS) 7.0 - The Technical Reference, © 2008 Microsoft Press Germany, ISBN 978-3- 86645-924-3 XV Acknowledgments The book you are holding is the result of the collective effort of many people. We'd like to start by thanking Bill Staples, Mai-Lan Tomsen Bukovec, and the entire IIS product team for their support. Some of us work for the IIS product team. Therefore, we know firsthand that without the invaluable help of the team, we simply would not have been able to work on this book. We are also very grateful to Martin DelRe of Microsoft Press for his vision, for his hard work to bring this project to life and bring it to a successful conclusion, and for his never-ending support and encouragement. It takes a lot of people and a lot of work to create a book like this. There are some people we'd like to specifically thank. Without them, this book would not exist. Brett Hill initiated this project and was part of it until it was completed. Special thanks go to Mike Volodarsky for whom quality and completeness are very important which led to him becoming the lead author. Kurt Meyer was a great help as a project manager. He coordinated the work of the authors and ensured that the respective project stages were almost always achieved within the given time frame. Many of our colleagues on the IIS product team provided important information that went into the book. In fact, each chapter was reviewed by at least one member of the product team. Other team members wrote the "straight from the source" insets, which are scattered throughout the book and give you a unique look at the design and development of IIS 7.0. Our sincere thanks also go to the following members of the IIS product team who worked with us on this book. They are listed in alphabetical order, sorted by first name: Anil Ruia, Bill Staples, Edmund Chou, Eric Deily, Fabio Yeon, Jaroslav Dunajsky, Kanwaljeet Singla, Nazim Lala, Michael Brown, Thomas Marquardt, Tobin Titus, Ulad Malashanka and Wade Hilmo. We would also like to thank Tito Leverette for his advice and contribution to chapter seventeen, "Optimizing Performance." Many other Microsoft teams also agreed to conduct a technical review and share their experiences and insights with us. Our special thanks go to Tom Hawthorn of the Windows Performance team and George Holman and the entire Microsoft.com operations team. Nick McCollum of Quixtar Inc. also assisted with specialist editing and suggestions for Chapters 5, 15, and 17. Next, we would like to thank the excellent editing and editing team. Our special thanks go to the project editors Karen Szall and Victoria Thulman from Microsoft Press for their professionalism, their support activities, their extraordinary editorial work and, above all, for their patience. Bob Hogan and Bob Dean were responsible for reviewing this book. They ensured a uniform writing style and easy understanding of the texts. Jean Findley of Custom Editorial Productions, Inc., did an excellent job organizing the book production, which was on a tight timeline. Microsoft Internet Information Services (IIS) 7.0 Technical Reference, © 2008 Microsoft Press Germany, ISBN 978-3-86645-924-3 XVI Acknowledgments We also thank Susan Chory and Isaac Roybal for helping us set this project up. Thanks also go to Simon Brown and Arvindra Sehmi, who provided the necessary incentive for this work.We thank you all! Sincerely, The team of authors: Mike, Olga, Brett, Bernard, Steve, Carlos, and Kurt Microsoft Internet Information Services (IIS) 7.0 - The Technical Reference, © 2008 Microsoft Press Germany, ISBN 978-3-86645-924-3 XVII Introduction What this chapter contains : What new features does IIS 7.0 offer? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Overview of the book. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Special markings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Companion CD Contents. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Find more content online. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . XVII XIX XIX XX XXI Welcome to IIS (Internet Information Services) 7.0 - The technical reference! This book is a professional source of information for the deployment planning, provision and operation of IIS 7.0 (Internet Information Services), Microsoft's next generation of web server platforms. Although this technical reference is primarily intended for IT professionals who have experience with previous versions of IIS, the book will also be very helpful for those who want to learn how to deploy and operate IIS 7.0. This technical reference provides detailed information about the improvements made to IIS 7.0 and the underlying architectural concepts that will help you understand the principles of deploying and managing IIS 7.0 web servers. In addition, you will explore techniques that enable you to take advantage of the new IIS 7.0 features and capabilities. It also provides detailed information and task-based guidance on all other aspects of IIS 7.0 administration, including deploying modular web servers, configuring web sites and web applications, and improving web server security, reliability, and performance. You will also find tons of side notes from members of the IIS product team that provide an in-depth look at how IIS 7.0 works, best practices for managing the web server platform, and invaluable troubleshooting tips. Finally, the media that accompanies this book contains additional tools and documentation that you can use to administer IIS 7.0 web servers and solve problems. What is new in IIS 7.0? IIS 7.0 was built from scratch to provide a modular and expandable web server platform. This platform forms the basis for slim, lightweight web servers that can be tailored to different workloads and different web applications. The new expandable architecture enables you to configure a tailor-made web server. You can select the IIS features you need and add or replace them with new web server features that use the new feature-rich extensibility APIs (Application Programming Interface). The web server also offers a new distributed configuration system and management tools that make it easier to deploy and manage. The core features of IIS 7.0 take advantage of the reliability and security architecture introduced by its predecessor, IIS 6.0, and add additional enhancements to make it Microsoft Internet Information Services (IIS) 7.0 - The Technical Reference, © 2008 Microsoft Press Germany , ISBN 978-3-86645-924-3 XVIII Introduction to expand the reliability and security of the web server platform. IIS 7.0 also includes expanded support for application frameworks that are compatible with, for example, FastCGI and offer closer integration with ASP.NET. In addition to the many improvements, IIS 7.0 offers the following special features: Modular web server architecture In contrast to its monolithic predecessors, IIS 7.0 is a completely modular web server that consists of more than forty components. The administrator can install these components individually in order to generate lightweight web servers with a user interface that is limited to the essentials and that play their intended roles within the application topology. In addition, thanks to the new extensibility architecture, it is possible to replace any of the integrated modular features with tailor-made implementations provided by Microsoft or third-party providers. .NET Extensibility Through ASP.NET Integration The new ASP.NET integration enables you to develop IIS 7.0 features using ASP.NET and the .NET Framework, reducing development and maintenance costs for custom web server solutions . In this case, you can use existing ASP.NET services to extend application technologies. This also applies to technologies that were not developed with ASP.NET in mind. With the help of these possibilities, IIS 7.0 web applications can adapt the web server to their own needs without incurring higher development costs, which could not be avoided with the ISAPI solution (Internet Server Application Programming Interface) used up to now. Expanded Application Framework Support In addition to expanding the web server with improved ASP.NET integration, IIS 7.0 provides additional options to support other application frameworks. This also includes the FastCGI protocol, which is used by many open source application frameworks such as PHP (PHP Hypertext Preprocessor). Such frameworks are now easily supported in a Windows environment due to the fact that IIS 7.0 can work with FastCGI. Distributed Configuration System with the Ability to Delegate IIS 7.0 replaces the centralized metabase configuration store with a new configuration system based on a hierarchy of distributed XML files. This enables the applications to define their own configurations. The new configuration system enables simplified application development without administrative involvement. It also forms the basis for more flexible management of the web server configuration. Improved Administration Tools IIS 7.0 offers a variety of different administration tools that use the new configuration system to make managing the web server configuration more flexible and easier. These include a brand new IIS task-based manager that enables remote delegated administration, a new command line management tool (Appcmd), and several APIs to manage web server configuration using scripts, Windows Management Instrumentation (WMI) and .NET Framework Programs. Advanced Diagnostics and Troubleshooting IIS 7.0 provides diagnostic features to help you investigate Web server problems and use a failed request tracing infrastructure to resolve problems that are difficult to determine. The tracing features are built into ASP.NET applications to enable full web application diagnostics to be performed from endpoint to endpoint. Microsoft Internet Information Services (IIS) 7.0 Technical Reference, © 2008 Microsoft Press Germany, ISBN 978-3-86645-924-3 Introduction XIX Book Overview The four parts of this book cover the following topics: Part 1: Fundamentals Provides an overview About the IIS 7.0 features, describes the improvements introduced with IIS 7.0 and introduces the core architecture of a web server. Part 2: Deployment Explains the modular installation architecture that is important for deploying IIS 7.0 and provides instructions for installing IIS 7.0 for various common web server load scenarios. Part 3: Administration Explains the key concepts of IIS 7.0 administration and describes how to use the administration tools provided by IIS 7.0 to perform certain administration tasks. Part 4: Troubleshooting and Performance Explains how to use the logging and tracing infrastructure to keep the web server running smoothly, how to troubleshoot causes, and how to monitor and improve web server performance. The book also contains several appendices on various subjects and a glossary for reference. Special markings The following markings are used in this book to highlight certain special features. Reading Aids The following reading aids are used throughout the book to indicate useful information. Reading aid Meaning Note Underlines the importance of a particular concept or highlights a particular case that is not commonplace. Important Draws attention to important information that should not be ignored system, functionality, etc. On CD Draws your attention to a script, tool, template, or job aid on the enclosed CD-ROM that will help you solve a task described in Microsoft Internet Information Services (IIS) 7.0 - The Technical Reference, й 2008 Microsoft Press Germany, ISBN 978-3-86645-924-3 XX Introduction Inserts Throughout this book, the following insets are used to provide additional insight and to provide tips and advice on the refer to the various IIS 7.0 features. Inset Meaning Straight from the source Contributions from Microsoft experts, that is, straight from the source, that provide insights into how IIS 7.0 works, explain best practices for IIS 7.0 administration, and provide troubleshooting tips. How it works Gives an impression of IIS 7.0 Features and How They Work Command Line Examples This book uses the following design features to present command line examples. Style Meaning Bold font Indicates user input (character strings that you enter exactly as they are printed in the text) Italic font Indicates variables to which specific values ​​must be assigned (name_file stands for any valid file name, for example) Non-proportional font Indicates code examples and command line outputs% SystemRoot% notation Environment Variables Companion CD Contents The Companion CD is a useful addition to this book and has the following contents: Electronic Book All of the text of the printed book in a searchable PDFeBook Scripts Scripts to help you use IIS - Automate Tasks Tools Links to tools for IIS, Windows PowerShell, etc. that you can use directly. Product Information Links to information about the features and capabilities of IIA NS Windows Server 2008 and other products that will help you use Windows Server 2008 in your company to optimize Resources Links to how-to guides, technical resources, webcasts, forums, and so on that will teach you how to use the features of IIS, Windows Server 2008, and other products and solve problems Microsoft Internet Information Services (IIS) 7.0 - The Technical Reference, © 2008 Microsoft Press Deutschland, ISBN 978-3-86645-924-3 Introduction XXI Finding More Content Online When new or updated material is available that supplements any of your books, it will be posted on the Microsoft Press Online server and client Web sites. For the final version of Windows Server 2008, this material could be book updates, articles, links to related content, corrections, sample chapters, and so on. This website is available and updated regularly at: http://www.microsoft.com/learning/ books / online / serverclient. Please note that the information published there is in English. Technical Reference Support Policy Every effort has been made to ensure the accuracy of this book and the accompanying media. Microsoft Press has potential corrections to its books available at the following Web address: http://www.microsoft-press.de/support.asp. If you have any comments, questions, or ideas about this book or its contents, or if your questions were not answered after visiting the sites listed above, please send them to Microsoft Press. By email: [email protected]