Wednesday, March 25, 2009

Book Review- Professional IIS 7.0 by Wrox

Professional IIS 7

As the first update to Microsofts server operating system in nearly five years, Windows Server 2008 boasts the new Internet Information Services 7.0 (IIS 7), which is the largest departure from previous versions of IIS ever. Written by an author team that includes four Microsoft MVPs, this book shows you how to take advantage of these exciting new features of IIS 7. With a clear understanding of IIS 7, youll learn to deploy, install, monitor, manage, and secure an IIS environment with confidence and ease.

As the first update to Microsoft's server operating system in nearlyfive years, Windows Server® 2008 boasts the new Internet Information Services 7.0 (IIS 7), which is the largest departure from previous versions of IIS ever. With IIS 7, Microsoft has completely changed the way the product works, including new configuration, delegated administration, security enhancements, real-time diagnostic and troubleshooting features, plus more.

Written by an author team that includes four Microsoft MVPs, this book shows you how to take advantage of these exciting new features of IIS 7. The authors draw on their expertise in the areas of deployment, hosting, development, and enterprise operations in order to help you with the learning curve of becoming familiar with IIS 7. With a clear understanding of IIS 7, you'll learn to deploy, install, monitor, manage, and secure an IIS environment with confidence and ease.

Read IT For Free.

  • Paperback: 812 pages
  • Publisher: Wrox; Pap/Onl edition (March 10, 2008)
  • Language: English
  • ISBN-10: 0470097825
  • ISBN-13: 978-0470097823

What’s New In IIS 7.0

IIS 7.0 has been re-engineered at its core to deliver a modular and extensible Web server platform, forming the foundation for lean, low-footprint Web servers that power customized workloads and Web applications. The new extensible architecture enables the Web server to be completely customized; you can select only the required IIS features and add or replace them with new Web server features that leverage the new rich extensibility application programming interfaces (APIs). In addition, the Web server enables the use of a new distributed configuration system and management tools that simplify Web server deployment and management. The core feature set of IIS 7.0 continues to leverage the reliability and security-focused architecture established by its predecessor, IIS 6.0, and it adds additional improvements to enhance the reliability and security of the Web server platform. IIS 7.0 also includes extended support for application frameworks, including better integration with ASP.NET and built-in support for FastCGI-compliant application frameworks. Among its many improvements, IIS 7.0 delivers the following: ■ Modular Web server architecture Unlike its monolithic predecessors, IIS 7.0 is a completely modular Web server, containing more than 40 components that the administrator can individually install to create low-footprint, reduced surface-area Web server deployments that play a specific role in the application topology. Furthermore,the new extensibility architecture enables any of the built-in modular features to be replaced with customized implementations that Microsoft and third parties provide. ¡ .NET Extensibility through ASP.NET integration The new ASP.NET integration capabilities enable you to develop IIS 7.0 features with the power of ASP.NET and the .NET Framework, reducing development and maintenance costs for custom Web server solutions. You can use existing ASP.NET services in this mode to enhance any application technologies, even those that were not developed with ASP.NET in mind. These abilities enable Web applications using IIS 7.0 to further customize the Web server to their needs without incurring the higher development costs associated with the previously used Internet Server Application Programming Interface (ISAPI). ¡ Enhanced application framework support In addition to improved ASP.NET integration for extending the Web server, IIS 7.0 provides more options for hosting other application frameworks. This includes the built-in support for the FastCGI protocol, a protocol used by many open source application frameworks such as PHP Hypertext Preprocessor (PHP) so that they can be reliably hosted in a Windows environment. ¡ Distributed configuration system with delegation support IIS 7.0 replaces the centralized metabase configuration store with a new configuration system based on a distributed hierarchy of XML files, which enables applications to control their own configuration. The new configuration system enables simplified application deployment without the overhead of required administrative involvement and provides the foundation for more flexible Web server configuration management. ¡ Improved management tools IIS 7.0 offers a host of management tools that leverage the new configuration system to provide more flexible and simpler configuration management for the Web server. This includes a brand new task-based IIS Manager tool, which offers remote delegated management; a new tool for command line management (Appcmd); and several APIs for managing Web server configuration from scripts, Windows Management Instrumentation (WMI), and .NET Framework programs. ¡ Enhanced diagnostics and troubleshooting IIS 7.0 provides diagnostic features to help diagnose Web server errors and troubleshoot hard-to-reproduce conditions with a Failed Request Tracing infrastructure. The diagnostic tracing features are integrated with ASP.NET applications to facilitate end-to-end diagnostics of Web applications

Introducing IIS 7.0

Microsoft Internet Information Services (IIS) 7.0 in Windows Server 2008 is a Web server that provides a secure, easy-to-manage platform for developing and reliably hosting Web applications and services. IIS 7.0 has been completely redesigned and offers major advantages over previous versions of IIS. With its new modular and extensible architecture, IIS 7.0 makes developing, deploying, and configuring and managing Web applications and infrastructure easier and more efficient than ever before. To put it simply, IIS 7.0 is the most powerful Microsoft Web server platform ever released. It provides an array of new capabilities that improve the way Web applications and services are developed, deployed, and managed. The modular design of IIS 7.0 gives administrators full control over their Web servers’ functionality, providing an extensible architecture that enables administrators and developers to build customized and specialized Web servers. New administration capabilities and the distributed XML-based configuration system make deploying and managing Web applications on IIS 7.0 more straightforward and efficient than on any other Web server. In addition, new diagnostic and troubleshooting capabilities of IIS 7.0 enable administrators and developers alike to minimize potential downtime. In this chapter, we will focus on the major new features and functionality in IIS 7.0 and their advantages over previous versions of IIS. We will also look at basic administration tasks and discuss the differences in the availability of IIS 7.0 features in Windows Server 2008 and Windows Vista. Overview of IIS 7.0 IIS 7.0 provides features and functionality that enable administrators to reliably and effectively manage Web infrastructures; developers to rapidly build Web applications and services; and hosters to provide a cost-effective, scalable, and reliable Web hosting to a broad set of customers.

 

For administrators, IIS 7.0 provides a secure, reliable, and easy-to-manage Web server platform. The customizable installation of IIS 7.0 ensures that they can minimize the attack surface, patching requirements, and the memory footprint of their Web infrastructure. The IIS 7.0 process model makes Web sites and applications more secure by automatically isolating them, providing sandboxed configuration and unique process identity by default. IIS 7.0 reduces management complexity, providing a set of tools that make administration of Web infrastructures more efficient. IIS Manager has a new task-based, feature-focused management console, which provides an intuitive user interface for administrative tasks. In addition to IIS Manager, there is also a new command line administration tool, a Windows Management Instrumentation (WMI) provider, and a .NET application programming interface (API). IIS 7.0 supports simplified management of Web farms where Web server configuration can be stored together with Web application code and content on a centralized file server and can be shared across front-end Web servers on a farm. IIS 7.0 enables administrators to securely delegate site and application administrative control to developers and content owners without administrative privileges on the server, thus reducing the administrative burden and cost of ownership. Using IIS Manager from Windows Vista, Windows XP, Windows Server 2003, or Windows Server 2008, developers and content owners can manage their sites and applications remotely while connected to a server over HTTPS from any location. In addition, new troubleshooting and diagnostics capabilities in IIS 7.0 enable administrators to reduce Web server downtime. For developers, IIS 7.0 provides a flexible, more extensible Web server platform for developing and deploying Web applications on Windows Server 2008 and Windows Vista. Developers can build applications on IIS 7.0 using the Web framework of their choice, including ASP.NET, classic ASP, PHP, PERL, ColdFusion, Ruby, and many others. IIS 7.0 provides unprecedented extensibility. It has a fully componentized architecture, with more than 40 pluggable modules built on top of public extensibility APIs. Developers can create new or replacement modules in native or managed code, extend IIS configuration, and build IIS Manager extensions that plug in seamlessly to the management console. IIS 7.0 has a distributed file-based configuration system that enables IIS settings to be stored in web.config files along with the ASP.NET settings. This unified configuration system simplifies development and enables applications to be xcopy-deployed, preconfigured, to IIS 7.0 servers. In addition, new diagnostic capabilities, including access to run-time information and automatically tracing failed requests, help developers to troubleshoot issues quicker and minimize Web site downtime. For hosters, IIS 7.0 provides a cost-effective, more scalable Web server platform for delivering reliable Web hosting to a broad set of customers. IIS 7.0 lowers costs by providing a new,

 

scalable shared hosting architecture that is capable of hosting thousands of Web sites on a single IIS 7.0 server without sacrificing isolation or reliability. IIS 7.0 enables Web hosters to reach more customers by using a new FastCGI module that is capable of providing fast and reliable hosting for PHP and other Web frameworks. In addition, IIS 7.0 provides a File Transfer Protocol (FTP) server that enables Web hosters to offer their customers a fully integrated Web/FTP platform with modern publishing capabilities, such as FTP over Secure Sockets Layer (SSL) and membership-based authentication. Whatfs New in IIS 7.0 IIS 7.0 has been completely redesigned and re-engineered from the ground up. The new features and functionality provide many new capabilities that enable administrators and developers to: ¡ Minimize patching and security risks with fine-grained control over the Web server footprint. ¡ Implement new Web solutions rapidly by using an extensibility framework. ¡ Go to market faster with simplified deployment and configuration of applications. ¡ Reduce administrative costs by managing Web infrastructures more efficiently. ¡ Reduce Web site downtime by quickly resolving faulty applications. These advancements have been made possible because of major innovations in IIS 7.0, as follows: ¡ A modular, extensible core Web server ¡ A unified, distributed file-based configuration system ¡ Integrated health monitoring and diagnostics ¡ A set of new administration tools with delegation support In addition, IIS 7.0 offers a new Windows Process Activation Service (WAS) that exposes IIS 7.0 processing model to both HTTP and non-HTTP based applications and services. Letfs look at these innovations and their advantages over previous versions of IIS in more detail. Core Web Server The IIS 7.0 core Web server has been completely redesigned and is very different from IIS 6.0. Its new, fully componentized architecture provides two fundamental enhancements that form a foundation for many advantages in security, performance, scalability, manageability, and flexibility. These two fundamental enhancements are modularity and extensibility.

Modularity In previous versions of IIS, all functionality was built by default into a monolithic server. There was no easy way to extend or replace any of that functionality. In IIS 7.0, the core Web server has a completely modular architecture. All of the Web server features are now managed as standalone components. The IIS 7.0 Web core is divided into more than 40 separate components, each of which implements a particular feature or functionality. These components are referred to as modules. You can add, remove, and replace the modules depending on your needs. In IIS 7.0, the ASP.NET run time is fully integrated with the core Web server, providing a unified request processing pipeline. Both native and managed code is processed through this single request pipeline. All notification events in the request pipeline are exposed to both native and managed modules. This integration enables existing ASP.NET features—including forms-based authentication, membership, session state, and many others—to be used for all types of content, providing a consistent experience across the entire Web application. Figure 1-1 shows the unified request processing pipeline, with several stages shown at the beginning and at the end of request processing. At the Authenticate Request stage, Figure 1-1 shows authentication modules that are available for all requests. Basic Authentication, Windows Authentication, and Anonymous Authentication are native modules. Forms Authentication is a managed module. Both native and managed authentication modules provide services for any content type, including managed code, native code, and static files.

IIS 7.0 modularity enables you to do the following:

■ Secure the server by reducing the attack surface area. Reducing an attack surface area is one of the major steps to a secure system. In IIS 7.0, Web server features that are not required can be safely removed without affecting the functionality of your applications, thus reducing the attack surface area.

■ Improve performance and reduce memory footprint. When you remove Web server features that are not required, the server’s memory usage is reduced. In addition, the amount of code that executes on every request is reduced, leading to improved performance.

■ Build custom and specialized servers. Selecting a particular set of server features and removing the ones that are not required allows you to build custom servers that are optimized for performing a specific function, such as edge caching or load balancing.

Tuesday, March 24, 2009

Great Internet Information Service (IIS) 7.0 Resources

Resources from the Resource Kit.

Internet Information Service (IIS) 7.0 Resources

IIS 7.0 Feature Reference
IIS 7.0: Operations Guide
Internet Information Services (IIS) 7.0 SDK
IIS 7.0 Web Administration Reference
IIS WMI Provider Reference
Windows Server 2008 Security Guide
Windows Server 2008 Step-by-Step Guides
DFS Operations Guide: Using the DFSRAdmin Command-line Tool
DNS Server GlobalNames Zone Deployment
Windows Server 2008 Release Candidate: System Requirements and Installation Documentation
Windows Server 2008 Reviewers Guide
Volume Activation 2.0 Technical Guidance
Active Directory Certificate Services Step-by-Step Guide
Active Directory Operations Guide: Active Directory Backup and Restore
Step-by-Step Guide for Fine-Grained Password and Account Lockout Policy Configuration
Step-by-Step Guide for Read-Only Domain Controllers
Step-by-Step Guide for Windows Server 2008 Active Directory Domain Services Installation and Removal
Step-by-Step Guide for AD FS in Windows Server 2008
Windows Server Active Directory Rights Management Services Step-by-Step Guide
Using Identity Federation with Active Directory Rights Management Services Step-by-Step Guide
Step-by-Step Guide for Configuring a Two-Node File Server Failover Cluster in Windows Server 2008
Step-by-Step Guide for Configuring a Two-Node Print Server Failover Cluster in Windows Server 2008
Step-by-Step Guide for Configuring Network Load Balancing with Terminal Services: Windows Server 2008
Step-by-Step Guide for File Server Resource Manager in Windows Server 2008
Step-by-Step Guide for Storage Manager for SANs
Windows Server 2008 NFS Step-by-Step Guide
Windows Server 2008 Performance and Reliability Monitoring Step-by-Step Guide<
Windows Server 2008 Print Management Step-by-Step Guide
Server Core Installation Option of Windows Server 2008 Step-by-Step Guide
Windows Server 2008 Release TS Licensing Step-by-Step Setup Guide
Windows Server 2008 Terminal Services RemoteApp Step-By-Step Guide
Windows Deployment Services Role Step-by-Step Guide
Windows Server 2008 TS Gateway Server Step-by-Step Guide
Windows Server 2008 TS Licensing Step-by-Step Guide
Windows Server 2008 Terminal Services RemoteApp Step-by-Step Guide
Windows Deployment Services Role Step-by-Step Guide
Command Reference<
Network and Sharing Center Operations Guide
Operations Manager 2007 Design Guide

Technical Resources

IIS Download Center
IIS TechCenter
IIS Events
Windows Server 2008 TechCenter
Windows Server 2008 Technical Library
Changes in Functionality from Windows Server 2003 with SP1 to Windows Server 2008
Windows Server 2008 Release Notes

Webcasts

IIS 7.0 Overview
IIS 7.0 - Writing Custom Modules
The .NET Show: IIS 7.0
Live From Redmond: Getting Started with Microsoft's IIS 7.0
Windows Server 2008: Webcasts
Windows Server 2008 Webcast Express Demo Videos
Events and Webcasts Overview
Windows Server 2008 Virtual Labs
Windows Server 2008 Podcasts
Windows Server 2008 Chats
Windows Server 2008 Webcasts and Chats

Authors' Blogs

Bernard Cheah
Brett Hill
Carlos Aguilar Mares
Steve Schofield
Mike Volodarsy

Communities and Newsgroups

IIS Forums
IIS Blogs
Windows Server 2008 Web Forums
Windows Server Community
Community Centers for Windows Server Technologies
Windows Server Division Weblog

Training and Certification Resources

Windows Server 2008 Learning Portal

Evaluation Resources

Windows Server 2008 Evaluation Software

Windows Administration Resource Kit: Productivity Solutions for IT Professionals

Evaluation Resources

Windows Server 2008 Evaluation Software
Windows Server 2008 Beta Central Windows Server 2008 Resources Page

Windows Server 2008 TechCenter: Evaluate Windows Server 2008

Windows Server 2008 Webcast Express Demo Videos
Windows Server 2008 System Requirements
Windows Server 2008 Datasheet
Windows Server 2008 Frequently Asked Questions

Technical Resources

Windows Server 2008 TechCenter
Windows Server 2008 Technical Library
Changes in Functionality from Windows Server 2003 with SP1 to Windows Server 2008
Windows Server 2008 Release Notes
What's New in Failover Clusters for Windows Server 2008
What's New in Terminal Services for Windows Server 2008
Microsoft SCEP Implementation Whitepaper
Hypervisor Functional Specification
The Encrypting File System
Scripting with Windows PowerShell

TechNet Event Review Webcasts

Server Role Management Windows Server 2008 (Session ITPROADD-201)
Server Core Running a Minimal Windows Server 2008 (Session ITPROADD-202)
UNIX Interoperability in Windows Server 2008 (Session ITPROADD-203)
PKI Enhancement in Windows Vista and Windows Server 2008 (Session ITPROADD-204)
Windows Server 2008 Technical Overview Part 1 (Session ITPROADD-300)
Windows Server 2008 Technical Overview Part 2 (Session ITPROADD-301)
Windows Server 2008 Network Access Protection (NAP) Technical Overview (Session ITPROADD-302)
Next Generation Networking with Windows Vista and Windows Server 2008 (Session ITPROADD-303)
Windows Vista and Windows Server 2008 Branch Office Technology (Session ITPROADD-304)
BitLocker Deployment (Session ITPROADD-305)
Active Directory Domain Services (AD DS) in Windows Server 2008 Technical Overview (Session ITPROADD-306)
Windows Server 2008 Terminal Services Technical Overview (Session ITPROADD-400)

Windows Server Update Services Resources

WSUS 3.0 Usability Improvements whitepaper
Step-by-Step: Getting Started with Microsoft Windows Server Update Services 3.0
Release Notes for Microsoft Windows Server Update Services 3.0

Webcasts

Windows Server 2008: Webcasts
Windows Server 2008 Webcast Express Demo Videos
Events and Webcasts Overview
Windows Server 2008 Virtual Labs
Windows Server 2008 Podcasts
Windows Server 2008 Chats
Windows Server 2008 Webcasts and Chats
Windows PowerShell: Next Generation Command Line Scripting (Level 300)

Training and Certification Resources

Windows Server 2008 Learning Portal
General IT Training and Certification Resources

Communities and Newsgroups

Windows Server 2008 Web Forums
Windows Server Community
Community Centers for Windows Server Technologies
Windows Server Division Weblog
ActiveDir.Org

Guides

Windows BitLocker Drive Encryption Design and Deployment Guides
Certificate Settings in Group Policy Step-by-Step Guide for Windows Server Code Name "Longhorn"
Network and Sharing Center Operations Guide
Operations Manager 2007 Design Guide
Windows Server 2008 Security Guide
Windows Server 2008 Step-by-Step Guides
DFS Operations Guide: Using the DFSRAdmin Command-line Tool
DNS Server GlobalNames Zone Deployment
Windows Server 2008 Release Candidate: System Requirements and Installation Documentation
Windows Server 2008 Reviewers Guide
Volume Activation 2.0 Technical Guidance
Active Directory Certificate Services Step-by-Step Guide
Step-by-Step Guide for Fine-Grained Password and Account Lockout Policy Configuration
Step-by-Step Guide for Read-Only Domain Controllers
Step-by-Step Guide for Windows Server 2008 Active Directory Domain Services Installation and Removal
Step-by-Step Guide for AD FS in Windows Server 2008
Windows Server Active Directory Rights Management Services Step-by-Step Guide
Using Identity Federation with Active Directory Rights Management Services Step-by-Step Guide
Step-by-Step Guide for Configuring a Two-Node File Server Failover Cluster in Windows Server 2008
Step-by-Step Guide for Configuring a Two-Node Print Server Failover Cluster in Windows Server 2008
Step-by-Step Guide for Configuring Network Load Balancing with Terminal Services: Windows Server 2008
Step-by-Step Guide for File Server Resource Manager in Windows Server 2008
Step-by-Step Guide for Storage Manager for SANs
Windows Server 2008 NFS Step-by-Step Guide
Windows Server 2008 Performance and Reliability Monitoring Step-by-Step Guide
Windows Server 2008 Print Management Step-by-Step Guide
Server Core Installation Option of Windows Server 2008 Step-by-Step Guide
Windows Server 2008 Release TS Licensing Step-by-Step Setup Guide
Windows Server 2008 Terminal Services RemoteApp Step-By-Step Guide
Windows Deployment Services Role Step-by-Step Guide
Windows Server 2008 TS Gateway Server Step-by-Step Guide
Windows Server 2008 TS Licensing Step-by-Step Guide
Windows Server 2008 Terminal Services RemoteApp Step-by-Step Guide
Windows Deployment Services Role Step-by-Step Guide
Command Reference

Windows Server 2008 Networking and Network Access Protection (NAP)

Understanding IPv6, Second Edition

Thursday, February 26, 2009

II7.0 Troubleshooting and Logging

IIS Manager

IIS 7.0 introduces a completely new user interface, the IIS Manager. The IIS Manager makes it

easier to browse and make changes to IIS settings, including log file settings. For example,

if you wanted to implement the centralized logging in IIS 6.0, you had to use ADSUtil.vbs.

Now, the Centralized Logging option is exposed in the IIS Manager, as shown in Figure 15-1.

 

The XML-Based Logging Schema

IIS 7.0 uses a new configuration system that is XML-based and is very similar to the ASP.NET

configuration system. Each configuration section is defined in XML schema files located in

 

%SystemRoot%\system32\inetsrv\config\schema. Details on the configuration sections are

covered in Chapter 4, “Understanding the Configuration System.” Because information is

defined in XML files, it is easy to determine what attributes, elements, and enums are used.

The schema for IIS 7.0 contains a list of all the configurable options, so looking in the schema

file is a quick way to identify all the configurable settings for any feature, including logging.

The following listing is from the system.applicationHost/log section that is located in

%SystemRoot%\system32\inetsrv\config\schema\IIS_Schema.xml. (Some long lines have

been split to fit on the printed page.) As you can see, the XML clearly defines the names and

data types associated with each item.

<sectionSchema name="system.applicationHost/log">

<attribute name="logInUTF8" type="bool" defaultValue="true" />

<attribute name="centralLogFileMode" type="enum" defaultValue="Site" >

<enum name="Site" value="0"/>

<enum name="CentralBinary" value="1"/>

<enum name="CentralW3C" value="2"/>

</attribute>

<element name="centralBinaryLogFile">

<attribute name="enabled" type="bool" defaultValue="false" />

<attribute name="directory" type="string" expanded="true"

defaultValue="%SystemDrive%\inetpub\logs\LogFiles" />

<attribute name="period" type="enum" defaultValue="Daily">

<enum name="Hourly" value="4"/>

<enum name="Daily" value="1"/>

<enum name="Weekly" value="2"/>

<enum name="Monthly" value="3"/>

<enum name="MaxSize" value="0"/>

</attribute>

<attribute name="truncateSize" type="int64" defaultValue="20971520"

validationType="integerRange"

validationParameter="1048576,4294967295" />

<attribute name="localTimeRollover" type="bool"

defaultValue="false"/>

</element>

<element name="centralW3CLogFile">

<attribute name="enabled" type="bool" defaultValue="true" />

<attribute name="directory" type="string" expanded="true"

defaultValue="%SystemDrive%\inetpub\logs\LogFiles"

validationType="nonEmptyString" />

<attribute name="period" type="enum" defaultValue="Daily">

<enum name="Hourly" value="4"/>

<enum name="Daily" value="1"/>

<enum name="Weekly" value="2"/>

<enum name="Monthly" value="3"/>

<enum name="MaxSize" value="0"/>

</attribute>

<attribute name="truncateSize" type="int64" defaultValue="20971520"

validationType="integerRange"

validationParameter="1048576,4294967295" />

<attribute name="localTimeRollover" type="bool"

defaultValue="false"/>

<attribute name="logExtFileFlags" type="flags"

defaultValue="Date, Time, ClientIP, UserName, SiteName, ServerIP,

Method, UriStem, UriQuery, HttpStatus, Win32Status,

ServerPort, UserAgent, HttpSubStatus">

<flag name="Date" value="1"/>

<flag name="Time" value="2"/>

<flag name="ClientIP" value="4"/>

<flag name="UserName" value="8"/>

<flag name="SiteName" value="16"/>

<flag name="ComputerName" value="32"/>

<flag name="ServerIP" value="64"/>

<flag name="Method" value="128"/>

<flag name="UriStem" value="256"/>

<flag name="UriQuery" value="512"/>

<flag name="HttpStatus" value="1024"/>

<flag name="Win32Status" value="2048"/>

<flag name="BytesSent" value="4096"/>

<flag name="BytesRecv" value="8192"/>

<flag name="TimeTaken" value="16384"/>

<flag name="ServerPort" value="32768"/>

<flag name="UserAgent" value="65536"/>

<flag name="Cookie" value="131072"/>

<flag name="Referer" value="262144"/>

<flag name="ProtocolVersion" value="524288"/>

<flag name="Host" value="1048576"/>

<flag name="HttpSubStatus" value="2097152"/>

</attribute>

</element>

</sectionSchema>

 

Centralized Logging Configuration Options

Following is the logging section defined in the ApplicationHost.config file that controls

Centralized Logging options. You can change this so that your files are stored on another drive

or volume. You can enable options you want and disable whatever options you do not need.

<log>

<centralBinaryLogFile enabled="true"

directory="%SystemDrive%\inetpub\logs\LogFiles" />

<centralW3CLogFile enabled="true"

directory="%SystemDrive%\inetpub\logs\LogFiles" />

</log>

 

SiteDefaults Configuration Options

The SiteDefaults section in the ApplicationHost.config file, shown in the following code,

controls the logging settings that are used when creating new sites. You can configure two

options: the format of the log file and the location in which Failed Request tracing files are

stored.

<siteDefaults>

<logFile logFormat="W3C"

directory="%SystemDrive%\inetpub\logs\LogFiles" />

<traceFailedRequestsLogging

directory="%SystemDrive%\inetpub\logs\FailedReqLogFiles" />

</siteDefaults>

 

Disable HTTP Logging Configuration Options

In some cases, an IIS administrator does not require log files. If you would like to turn off

httpLogging at the server level, you can disable logging in the IIS Manager. You can also

disable logging at the site level. You might wonder why these options are available. It’s so that

you can disable logging on your test or development machines to reduce the disk space

that unnecessary files use.

You should evaluate your options before disabling httpLogging. Check with your business or

legal department to be certain what your company’s logging requirements and policies are.

The default value for this setting, as shown here, is false.

<httpLogging dontLog="false" />

 

Default Log File Location

One of the most significant changes in IIS 7.0 is that the folder where IIS stores WWW logs

has been changed to %SystemDrive%\inetpub\logs\LogFiles. For example, the Default Web

Site would log to C:\inetpub\logs\LogFiles\w3svc1. This means that by default in IIS 7.0, all

log files are stored in a single folder. Note, however, that log files for the legacy built-in File

Transfer Protocol (FTP) and Simple Mail Transfer Protocol (SMTP) services are still located in

%windir%\System32\Logfiles. You can manage these files by using the IIS Manager 6.0, an

MMC console that is installed when you install the legacy FTP service or the SMTP service.

Note The new FTP Publishing Service for IIS 7.0 stores its log files in %SystemDrive%\

inetpub\logs\LogFiles by default. You need to download and install this add-on, because it

does not ship with IIS 7.0. The x86 and x64 versions are available at http://www.iis.net. Click

Download and search for “Microsoft FTP Publishing Service for IIS 7.0.”

 

Default UTF-8 Encoding

By default, IIS 7.0 stores log files by using UTF-8 encoding. This changes the default file

naming convention so that the files start with u_ (for example, u_exYYMMDD.log). Here is

the portion of the IIS_Schema.xml file that sets the UTF-8 encoding option. The default

setting is true.

<sectionSchema name="system.applicationHost/log">

<attribute name="logInUTF8" type="bool" defaultValue="true" />

...

</sectionSchema>

UTF-8 encoding allows for single-byte and multi-byte characters in one string. This encoding

enables you to read text-based logs (for example, logs that use W3C Extended, IIS, and NCSA

Common formats) in a language other than English. IIS does not support the UTF-8 format

for the built-in FTP Publishing Service log files. UTF-8 encoding is available in IIS 6.0, but it is

not enabled by default. If you do not want to have your logs use UTF-8 encoding, you can use

ANSI as the format.

 

New Status Codes

In IIS 7.0, new status codes have been introduced for HTTP and FTP. These additional error

codes provide more details about events and better descriptions of how to fix errors, with

suggestions about what to look for or what procedures to run. Appendix A provides a

complete list of all status codes.

 

Management Service

IIS 7.0 introduces Management Service, which enables computer and domain administrators

to remotely manage a machine by using the IIS Manager. The Management Service also

enables nonadministrators to control sites and various applications by using the IIS Manager

from a workstation.

This service has its own logs that are used to track information related to the Management

Service. This service is not installed by default. If you install and enable this service, the logs

will be saved in %SystemDrive%\inetpub\logs\WMSvc.

From a logging perspective, you should make sure the Management Service logging is enabled.

The logs can help you audit and troubleshoot issues when clients are connecting to your

server. The Management Service is discussed in depth in Chapter 8, “Remote Administration.”

Log File Formats That Have Not Changed

IIS 7.0 supports all the common logging formats that are available in prior versions of IIS.

There have been no changes in IIS 7.0 to the following log file formats:

Microsoft IIS

NCSA

W3Svc extended

Note For descriptions, further discussion, and examples of these log formats, go to

http://msdn2.microsoft.com and search for “IIS logging formats.”

 

Centralized Logging

Centralized logging in IIS 7.0 operates the same way as it does in IIS 6.0. However, you can

now configure this option in the IIS 7.0 Manager. To access this feature, go to Administrative

Tools > Internet Information Services (IIS) Manager. Click the computer name and locate

the Logging option listed in the IIS section.

Using the Logging option can reduce administrative costs because only one IIS log file is

being maintained. If you use binary logging, the log can be stored in a much smaller file than

the equivalent text log file.

 

W3C Centralized Logging Format

W3C centralized logging was first introduced in Windows Server 2003 SP1. W3C centralized

logging is a server-level setting. When you enable this feature on a server, all Web sites on

that server are configured to write log data to a central log file. Data is stored in the log file

using the W3C Extended log file format. You can enable this setting through the IIS 7.0

Manager or by using Appcmd. If you use W3C centralized logging, you can view the log file

with a text editor such as Notepad.

Note W3C centralized logging uses the W3C Extended log format, which includes the following

four fields: HostHeader, Cookie, UserAgent, and Referrer. These fields are not available in

centralized binary logging.

 

Centralized Binary Logging Format

Centralized binary logging is essentially the same as W3C centralized logging, except that

the log file uses a proprietary, binary format. Because the resulting file is binary, it is smaller

than an equivalent text file so that you can conserve disk space. It cannot be read with a text

editor and requires parsing to produce useful information. However, this is easier than you

might think when you use the Log Parser tool, which reads the centralized binary file format

natively. The Log Parser tool is discussed later in this chapter.

Important The built-in FTP and SMTP services do not support W3C centralized logging.

 

Remote Logging

IIS 7.0 supports writing log files to a network share. This option enables you to have your log

files stored in real time to a remote computer. For example, suppose that you have a Web farm

configured for logging to a central location. The remote file server could be a server running

DFS (distributed file system). DFS can provide multiple benefits including a central location

to collect your log files and automatic replication of your logs to multiple locations. Having

such a primary collection point can make handling your reporting processes much easier.

Important When you set up your remote logging environment, make sure the host (A)

and pointer (PTR) DNS records are set up so that authentication and resolution happens

correctly. This can help avoid problems such as Kerberos authentication errors when HTTP.sys

is trying to write log files.

You can use either the IIS 7.0 Manager or Appcmd to set up Universal Naming Convention

(UNC) remote logging.

 

Setting Up Remote Logging by Using the IIS Manager

Following are the steps to enable remote logging by using the IIS Manager:

1. Create a directory called IISLogs on the remote server that will store the log files. This

machine is typically in the same domain as the Web servers. If the remote server is

not in the same domain or is a stand-alone machine, you can use the procedure outlined

in the following sidebar so your files are stored on a remote machine.

Using a NULL Session for Remote Logging

If your remote server will be in a different domain, you can set up a NULL Session to

support remote logging. The following procedure outlines how to set up this environment.

If your remote server is not in a different domain, you can skip over the details of

this outline and proceed with step 2 of the procedure for setting up remote logging by

using the IIS Manager.

Before setting up your environment, make sure both machines can resolve each other

using DNS, WINS, or custom entries in the local HOSTS file. This procedure assumes

both servers are Windows Server 2008.

1. Identify two machines, the Web server and the file server. These roles need to be

on separate physical machines.

2. Create a folder called IISLogs on your file server and then create a share and grant

appropriate folder security.

a. Open a command prompt on the file server and type mkdir c:\IISLogs

b. Then type net share IISLogs=c:\IISLogs /Grant:Everyone,FULL

c. Then type cacls c:\IISLogs /G Administrators:F SYSTEM:F Everyone:C

d. When you see the prompt “Are you sure (Y/N)?” type y

e. Processed dir: c:\IISLogs

3. Configure logging on your Web site by typing

appcmd set sites "WebsiteName" -logFile.directory:\\FileServerName\IISLogs

4. Configure Local Security Policy on the file server.

*Programs, Administrative Tools, Local Security Policy, Local Policies, Security Options*

a. Enable:Network access:Let Everyone permissions to apply to anonymous users.

b. Add IISLogs share to the Network access:Shares that can be accessed

anonymously.

5. Browse your Web site on the Web server.

a. Open http://localhost/

6. Open a command prompt on the Web server and type the following command:

netsh http flush logbuffer

7. Check your log files to see if your sample request is listed.

2. Share the IISLogs folder you created in the previous step. Change the share permissions

to—at minimum—enable both the remote machine accounts Administrators group and

the account that is writing the log files full control. Change the NTFS file system (NTFS)

permissions so that the remote machine accounts Administrators have full control and

the account writing the log files has modify permissions. This example assumes that

you are using the NETWORK SERVICE as your application pool account and that the

remote server and Web server are in the same domain.

Note When the NETWORK SERVICE account accesses a remote resource, it uses the

computer account stored in Active Directory Domain Service as the actual account

accessing the log folder.

3. In the IIS Manager, navigate to your Web site and type in the UNC path to the server.

To do so, go to Administrative Tools > Internet Information (IIS) Manager. Select the

computer name in the leftmost column and then double-click the Logging icon in

the IIS Section. Type the path to the share in the Directory text box by using the syntax

\\ServerName\ShareName, as shown in Figure 15-2.

Note You can also use the syntax \\FQDN\ShareName to specify the logging path,

but you might run into issues if you try to use the syntax \\IPAddress\ShareName to

specify the path. The \\IPAddress\ShareName syntax can cause an authentication issue

that prevents the log files from being created. The following is an example of an error

generated when trying to use an IP Address when remote logging is enabled:

Microsoft-Windows-HttpService , LogFileCreateFailed ,

49, 0, 16, 2, 59, 9,

0x0000000000000800, 0x00000004, 0x000005AC, 0,

, , {00000000-0000-0000-0000-

000000000000}, ,

128277049412643098, 220, 0, 0xC0000022,

"ResponseLogging ", "Site ", "W3C ",

"\dosdevices\UNC\192.168.0.125\UncLogFiles\W3SVC1\u_ex070630.log",

0 4. Click Apply.

5. Browse a Web page in your site.

6. Open a command prompt by using elevated credentials and type netsh http flush

logbuffer. If this is the first time entries have been logged, HTTP.sys will create the

folder and a log file. Open the log file in Notepad to confirm your example entries have

been logged.

 

Setting Up Remote Logging by Using Appcmd

You can also use Appcmd to update the logfile directory for a specific Web site. The syntax for

configuring UNC remote logging using Appcmd is shown here. (The line has been split to fit it

on the printed page.)

//Appcmd to set the log directory path for Default Web Site

Appcmd set sites "Default Web Site"

-logFile.directory:\\RemoteServerCMD.Contoso.com\LogFiles

Note To automate configuring remote logging, you could put this example into a script to

which you can pass variables.

Executing this command results in the following output:

SITE object "Default Web Site" changed

 

 

IIS 7.0: Overview of IIS 7.0 Deployment Scenarios

IIS 7.0: Overview of IIS 7.0 Deployment Scenarios

This section contains information about how to deploy IIS 7.0 in six common configurations. IIS 7.0 lets you customize your installation to include only the modules that you must have to support your Web server. Before you choose an IIS configuration to deploy on your Web server, review the common modules and their uses to determine which modules match the requirements for your applications. For a description of the common modules, see IIS 7.0: Deploying an IIS 7.0 Web Server.

For more information about common IIS configurations, see Install Typical IIS Workloads on IIS.NET.

In This Section

IIS 7.0: Deploying a Classic ASP Server

IIS 7.0: Deploying an ASP.NET Server

IIS 7.0: Deploying a Static Content Server

IIS 7.0: Enabling FastCGI on IIS 7.0

IIS 7.0: Using Windows SharePoint Services 3.0 on IIS 7.0

IIS 7.0: Adding Windows Media Services 2008 on an IIS 7.0 Server

 

IIS 7.0: Deploying an IIS 7.0 Web Server

IIS 7.0: Deploying an IIS 7.0 Web Server

IIS 7.0 helps organizations and individuals meet their business needs by providing the services to support a secure, available, and scalable Web server on which to run Web sites and applications.

Before you deploy IIS 7.0, you must verify that your existing Web sites and applications are compatible with IIS 7.0 and with the Windows Server® 2008, Windows Vista® Business, Windows Vista® Ultimate, and Windows Vista® Home Premium operating systems. You should verify the compatibility of your Web sites and applications on a test Web server before you deploy IIS 7.0 on a production Web server.

noteNote

For additional requirements to consider before you deploy your IIS 7.0 Web server, see the IIS 7.0 Operations Guide.

You can deploy your Web sites and applications on an IIS 7.0 Web server in various configuration scenarios. This guide provides a starting point for you to determine which of the deployment scenarios presented will best suit your production environment. The topics in this section describe specific IIS 7.0 deployment scenarios that target common workloads. These scenarios include: a classic ASP server, a static content server, and a Windows SharePoint Services server.

For more information about typical IIS workloads, see Install Typical IIS Workloads on IIS.NET.

The following table lists the common modules that you can install on your IIS 7.0 Web server. You will also find descriptions for the modules installed on each of the server configurations in their corresponding topics. Review the descriptions for each module to determine which ones meet the requirements for your specific configuration.

 

Use this module

To do this

Logging and Diagnostics

Troubleshooting

Perform tasks related to troubleshooting, including logging and diagnostics in the request-processing pipeline. Support loading of custom modules and for passing information to HTTP.sys for logging. Follow and report events during request processing to help troubleshoot sites and applications.

Failed Request

Troubleshooting

Perform tasks related to troubleshooting by enabling the Failed Request Tracing feature, which will help you identify and trace problems when they occur, and diagnose errors.

URL Authorization

Security

Perform URL authorization and determine whether the current user is permitted access to the requested URL based on the user name or the list of roles that a user is a member of.

Caching

Performance

Perform tasks related to improving performance by enabling caching in the request-processing pipeline. Improve performance of sites and applications by storing processed information in memory on the server and then reusing that information in subsequent requests for the same resource.

Compression

Performance

Perform tasks related to improving performance by enabling compression in the request-processing pipeline, including precompression of static content and compression of responses. Apply Gzip compression transfer coding to responses.

For detailed information about native and managed IIS 7.0 modules, see IIS 7.0 Modules Overview and Introduction to IIS 7.0 Architecture on IIS.NET.