IIS 7: The Administrator's Guide IIS 7: The Administrator's Guide
IIS 7: The Administrator's Guide IIS 7: The Administrator's Guide
Alexis Eller
Program Manager
Microsoft Corporation
IIS6 Request Processing
Avoid:
503 “Service Unavailable”
[module is enabled but not installed]
Application doesn’t work as expected
[web.config references a module that isn’t installed]
[unexpected module conflicts with custom module]
IIS6 ASP.NET Integration
Runtime limitations
Only sees ASP.NET requests
Authentication
NTLM Basic Anon
Feature duplication
…
CGI aspnet_isapi.dll
Determine Static Authentication
Handler File Forms Windows
ISAPI …
ASPX
… Map
Handler Trace
Send Response
…
Log Compress
…
IIS7 ASP.NET Integration
Basic
Two Modes
Anon
Authentication Classic (runs as ISAPI)
Integrated
Authorization
ResolveCache
… Integrated
aspnet_isapi.dllMode
Static
File .NET modules / handlers
Authentication
ExecuteHandler FormsplugWindows
directly into pipeline
… ISAPI …
Process all requests
ASPX
UpdateCache MapFull runtime fidelity
Handler Trace
SendResponse Compress …
…
Log
Migrating to Integrated ASP.NET
Replicate Content and Config
Main IIS configuration file (applicationHost.config)
Built-in “IUSR” account, no more machine specific SID’s
Simple file copy, no command line tools required
…watch for machine specific data like IP’s and drive letters
File System:
Client Side Caching (CSC)
provides a local disk cache
Distributed File System Replication (DFSR)
abstracts multiple file servers to one share name
provides content replication
Configuration moves to .config files…
ASP.NET
applicationHost.config web.config
.NET
Framework
root web.config
machine.config
By default…
All IIS sections locked except:
Default Document
Directory Browsing
HTTP Header
HTTP Redirects
All .NET Framework / ASP.NET sections are unlocked
Determine your configuration lockdown policy…
Be conservative at first
Unlock as necessary (locking later could break apps)
Compatibility: ABO Mapper
Provides compatibility for:
scripts IIS6
ADSI Script
command line tools
native calls into ABO
Not installed by default
IISADMIN
Can only do what IIS6 could do…
Can’t read/write new IIS properties ABOMapper
Application Pools: managedPipelineMode,
managedRuntimeVersion
Request Filtering
Failed Request Tracing
Can’t read/write ASP.NET properties
Can’t read/write web.config files
applicationHost.config
Can’t access new runtime data, e.g. worker processes,
executing requests
Management Tools
GUI IIS Manager
Command Line appcmd
Script WMI (root\WebAdministration)
Managed Code Microsoft.Web.Administration
Scenario:
User publishes application
User changes app’s web.config using IIS Manager
User copies updated web.config to his local version of the
application
Several days later, user re-publishes application
** modifications make to the app’s web.config using IIS
Manager have just been blown away**
Appcmd – Listing and Filtering
C:\> appcmd list sites
SITE "Default Web Site" (id:1,bindings:HTTP/*:80:,state:Started)
SITE "Site1" (id:2,bindings:http/*:81:,state:Started)
SITE "Site2" (id:3,bindings:http/*:82:,state:Stopped)
' Create site and extract site name from return value
Set oService = oIIS.Get("IIsWebService.Name='W3SVC'")
strSiteName = oService.CreateNewSite("NewSite", array(oBinding), "C:\inetpub\wwwroot")
Set oSite = oIIS.Get("IIsWebServer.Name='" & strSitePath & "'") Create Virtual Directory
oSite.Start
foreach(WorkerProcess w3wp in iisManager.WorkerProcesses) {
Console.WriteLine("W3WP ({0})", w3wp.ProcessId);
foreach(Request request in w3wp.GetRequests(0)) {
Console.WriteLine("{0} - {1},{2},{3}",
request.Url,
request.ClientIPAddr,
request.TimeElapsed,
request.TimeInState);
}
}
New Troubleshooting Features
Tomorrow
8:30 – 9:45 IIS 7: Under the Hood for Web Request Tracing
10:15 – 11:30 Chalktalk: Using Managed Code to Administer IIS 7
1:00 – 2:15 Chalktalk: Introducing the New and Improved IIS Manager in IIS 7
2:45 – 4:00 IIS 6: Effective Management of Web Farms
4:30 – 5:45 IIS 6: Everything the Web Administrator Needs to Know about MOM
Wednesday
8:30 – 9:45 Chalktalk: Extending the IIS Manager Tool in IIS 7
2:00 – 3:15 Chalktalk: IIS 6.0 Security: Setting the Record Straight
4:45 – 5:00 Chalktalk: IIS and Microsoft.com Operations: Migrating IIS 6.0 to 64 bit
5:30 – 6:45 Chalktalk: IIS 7 Q&A
Fill out a session
evaluation on
CommNet and
Win an XBOX 360!
© 2006 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.
The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a
commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation.
MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Additional Information
Installation Options
• Lots of components
• Static server by default
• [client] Use Windows
Features
• Replaces sysocmgr
• File format is
completely different
• [client] Pick components,
cannot set configuration
Install, Migration, Upgrade
Install log: \Windows\IIS7.log
Uninstall
Stop services to avoid a reboot
Deletes configuration files, backup before uninstall
Migration: none for Vista, LH Server TBD…
Upgrade
All web and/or FTP components are installed, uninstall
unnecessary components afterwards…
Application pools will be ISAPI mode, configured for no
managed code => all ASP.NET requests will fail
ASP.NET: Migration
Application Pools
ASP.NET Integrated mode by default
Configure to load a specific version of the .NET Framework
Integrated Mode
Different server environment for some pipeline notifications
e.g. request is not authenticated for BeginRequest
Handler and module configuration integrated with IIS
system.webServer/handlers, system.webServer/modules
Validation warns on httpHandlers, httpModules, or identity config
Remove “managedHandler” precondition on an ASP.NET module to
have it execute for all content
ISAPI Mode
Can’t configure HTTP handlers and modules from the UI
Replicating applicationHost.config
Will cause all application pools to recycle:
changes to default settings for all application pools
changes to the <globalModules> list
Will cause one application pool to recycle:
application pool settings
Use only RSA machine-encryption (default), replicate RSA
machine key
http://msdn2.microsoft.com/en-us/library/yxw286t2(VS.80).aspx
Gotcha's:
Machine specific data, like IP addresses or drive letters
Servers must have same set of modules installed (reference to non-
existent module in <globalModules> causes 503's)
Configuration Delegation
Two kinds of configuration locking:
overrideMode (similar to "allowOverride")
granular locking, e.g. lockItem, lockElements
By default…
All IIS sections locked (overrideMode=“Deny”) except:
Default Document, Directory Browsing, HTTP Header, HTTP
Redirects, Validation
All .NET Framework / ASP.NET sections are unlocked
Schema describes:
property types
default values
validation
encrypted by default?