SlideShare a Scribd company logo
IIS 7: The Administrator’s Guide Alexis Eller Program Manager Microsoft Corporation
Scripting… WMI  C#, VB.NET… Microsoft.Web.Administration Command Line… appcmd Server Modules  ASP.NET on IIS7 Centralization Detailed Errors Failed Request Tracing IIS Manager Deploy... Manage... Troubleshoot...
IIS6 Request Processing Send Response Log Compress NTLM Basic Determine  Handler CGI Static File Authentication Anon Monolithic implementation Install  all or nothing … Extend server functionality only through  ISAPI … ASP.NET PHP ISAPI … … Deploy...
IIS7 Request Processing Send Response Log Compress NTLM Basic Determine  Handler CGI Static File ISAPI Authentication Anon SendResponse Authentication Authorization ResolveCache ExecuteHandler UpdateCache … … Server functionality is split into ~ 40  modules ... Modules plug into a generic request pipeline… Modules  extend server functionality  through a public module API. … … Deploy...
Many, Many Modules Install, manage, and patch only the modules you use…   Reduces attack surface Reduces in-memory footprint Provides fine grained control …  replace  core server components with  custom components … Deploy...
Installing IIS7 Deploy...
Consistently install the same set of modules …   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] TIP Deploy...
IIS6 ASP.NET Integration Runtime limitations Only sees ASP.NET requests Feature duplication Send Response Log Compress NTLM Basic Determine  Handler CGI Static File ISAPI Authentication Anon … … Deploy... Authentication Forms Windows Map Handler ASPX Trace … … … aspnet_isapi.dll
IIS7 ASP.NET Integration Two Modes Classic (runs as ISAPI) Integrated Integrated Mode .NET modules / handlers plug directly into pipeline Process all requests Full runtime fidelity Log Compress Basic Static File ISAPI Anon SendResponse Authentication Authorization ResolveCache ExecuteHandler UpdateCache … … Authentication Forms Windows Map Handler ASPX Trace … … … aspnet_isapi.dll Deploy...
Migrating to Integrated ASP.NET Deploy...
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  IIS config    web.config, XCOPY with application Deploy...
Centralize Content and Config IIS config    web.config, centralize on file server 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 Deploy...
Configuration moves to .config files… Configure  IIS and ASP.NET  properties in the same file Use locking to provide  delegation Built for  simple, schema-based extensibility …  welcome to a world of  xcopy deployment … Manage...
Configuration Layout root configuration files machine.config root web.config applicationHost.config web.config .NET  Framework  ASP.NET IIS IIS +  ASP.NET +  .NET Framework web.config files \Windows\Microsoft.NET\Framework\v2.0.50727\config\web.config \Windows\system32\inetsrv\applicationHost.config \Windows\Microsoft.NET\Framework\v2.0.50727\config\machine.config Inheritance… Manage...
Configuration Delegation Delegation is:  Configuration locking, “overrideMode”  ACL’s on configuration files By default… All IIS sections locked except: Default Document Directory Browsing HTTP Header HTTP Redirects All .NET Framework / ASP.NET sections are unlocked Manage...
Determine your configuration lockdown policy… Be conservative at first Unlock as necessary (locking later could break apps) TIP Manage...
Compatibility:  ABO Mapper Provides  compatibility  for: scripts command line tools native calls into ABO Not installed by default Can only do what IIS6 could do… Can’t read/write new IIS properties Application Pools: managedPipelineMode, managedRuntimeVersion Request Filtering  Failed Request Tracing Can’t read/write ASP.NET properties Can’t read/write web.config files Can’t access new runtime data, e.g. worker processes, executing requests applicationHost.config IISADMIN ABOMapper IIS6  ADSI Script Manage...
Management Tools Manage  IIS and ASP.NET View  enhanced runtime data   worker processes, appdomains, executing requests Manage  delegation Use whichever management tool suits your needs… GUI Command Line Script Managed Code IIS Manager appcmd WMI (root\WebAdministration) Microsoft.Web.Administration Manage...
IIS Manager Remotes over HTTP, making it  firewall friendly  (remoting is not installed by default) Provides  managed extensibility Supports non-admin management of sites and applications Manage...
Educate end users who publish their application and use IIS Manager configure it… 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**   TIP Manage...
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)   C:\> appcmd list requests REQUEST "fb0000008000000e" (url:GET /wait.aspx?time=10000,time:4276 msec,client:localhost)  C:\> appcmd list requests /apppool.name:DefaultAppPool C:\> appcmd list requests /wp.name:3567 C:\> appcmd list requests /site.id:1  C:\> C:\> Filter results by application pool, worker process, or site C:\> Manage...
appcmd Manage...
Scripting: IIS6 WMI Provider Set   oIIS = GetObject("winmgmts:root\MicrosoftIISv2")  ' Create binding for new site Set   oBinding = oIIS.Get("ServerBinding").SpawnInstance_ oBinding.IP = "" oBinding.Port = "80" oBinding.Hostname = "www.site.com" ' 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   objPath = CreateObject("WbemScripting.SWbemObjectPath")  objPath.Path = strSiteName strSitePath = objPath.Keys.Item("")   Set   oSite = oIIS.Get("IIsWebServer.Name='" & strSitePath & "'") oSite.Start ' Create the vdir for our application Set   oVDirSetting = oIIS.Get("IIsWebVirtualDirSetting"). SpawnInstance_   oVDirSetting.Name = strSitePath & "/ROOT/bar"  oVDirSetting.Path = "C:\inetpub\bar"  oVDirSetting.Put_ ' Make the VDir an application Set   oVDir = oIIS.Get("IIsWebVirtualDir.Name='" & strSitePath & "/ROOT/bar'") oVDir. AppCreate2  1   Create Site Create Virtual Directory Create Application NOT CONSISTENT Manage...
Scripting: new WMI Provider Set   oService = GetObject("winmgmts:root\WebAdministration") ' Create binding for site Set   oBinding = oService.Get("BindingElement").SpawnInstance_ oBinding.BindingInformation = "*:80:www.site.com" oBinding.Protocol = "http" ' Create site  oService.Get("Site").Create _ "NewSite",   array (oBinding), "C:\inetpub\wwwroot" ' Create application  oService.Get("Application").Create _ "/foo", "NewSite", "C:\inetpub\wwwroot\foo" Static Create methods CONSISTENT Manage...
WMI – Unloading AppDomains   …through script   …through PowerShell Manage...
Coding: Microsoft.Web.Administration ServerManager iisManager =  new  ServerManager(); 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);     } } Manage...
New Troubleshooting Features Detailed custom errors, just like ASP.NET Failed Request Tracing No more ETW tracing and waiting for a repro… New runtime data: worker processes appdomains currently executing requests Troubleshoot...
Failed Request Tracing No-repro tracing   for “failed requests” Configure  custom failure definitions   per URL Time taken  Status/substatus codes Error level Persist failure log files Will it tell me what’s wrong? Sometimes… for example, ACL issues Look for clues Can use for all requests to see what’s going on Troubleshoot...
Failed Request Tracing Troubleshoot...
Summary Troubleshoot… Use: Detailed Errors, Failed Request Tracing,  Currently Executing requests Manage… Manage IIS and ASP.NET through the same tools Use ABO Mapper compatibility (not installed by default) Determine configuration lockdown policy Deploy… ~ 40 modules, install only what you need Migrate to ASP.NET Integrated Mode Easier centralization/replication
[email_address]
TechCenter to easily find the info you need Advice and assistance in Forums Insider info on new technology (IIS7!) Online labs, play with IIS7 in your browser New home for IIS Community!
Some upcoming IIS sessions… Today 3:15  –  4:30  Chalktalk:  Configuration Management of Web Platform 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 Server Manager Package Manager Server Manager Lots of components Static server by default [client] Use Windows  Features Package Manager Replaces sysocmgr Unattend File format is  completely different [client] Pick components,  cannot set configuration Deploy...
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 Deploy...
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 Deploy...
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) Deploy...
Configuration Delegation Two kinds of configuration locking: overrideMode  (similar to &quot;allowOverride&quot;) 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 Determine your  configuration lockdown policy be conservative at first unlock as necessary (locking later could break apps) Manage...
Configuration Schema Use the schema file to see all config settings: %windir%\system32\inetsrv\config\schema\IIS_schema.xml Schema describes: property types default values validation encrypted by default? note: config is case sensitive Manage...
Appcmd – Viewing Config Schema C:\> appcmd list config /section:? | findstr system.webServer system.webServer/globalModules system.webServer/serverSideInclude system.webServer/httpTracing ... C:\> appcmd list config /section:directoryBrowse <system.webServer>   <directoryBrowse enabled=&quot;true&quot; /> </system.webServer>  C:\> appcmd list config /section:directoryBrowse /config:* <system.webServer>   <directoryBrowse enabled=&quot;true&quot; showFlags=&quot;Extension, Size, Time, Date&quot; /> </system.webServer>  C:\> appcmd list config /section:directoryBrowse /text:* CONFIG   CONFIG.SECTION: system.webServer/directoryBrowse   path: MACHINE/WEBROOT/APPHOST   overrideMode: Inherit   [system.webServer/directoryBrowse]     enabled:&quot;true&quot;     showFlags:&quot;Extension, Size, Time, Date&quot;  C:\> C:\> IIS sections – also try  “system.web” and “system.applicationHost” C:\> C:\> Shows attributes that aren’t set explicitly Manage...
Coding: Microsoft.Web.Administration First managed code API for administering IIS Same objects and functionality as WMI, appcmd What about System.Configuration? System.Configuration:  Strongly typed ASP.NET and .NET Framework config Microsoft.Web.Administration:  Weakly typed IIS, ASP.NET, and .NET Framework config Strongly typed IIS objects like Sites and Application Pools Manage...

More Related Content

What's hot (20)

PDF
Build sites on iis
Paul Davis
 
PPTX
IIS7 For Non IIS PFEs
Kenny Abdiel Maita
 
PPTX
IIS 7.0 +
Muhammad Amir
 
PPTX
introduction and configuration of IIS (in addition with printer)
Assay Khan
 
PPT
Understanding iis part1
Om Vikram Thapa
 
PPTX
ASP.NET Request Processing Internals
Abhijit Jana
 
PPTX
How to Monitor IIS
Power Admin LLC
 
PPTX
Hosting a website on IIS Server
Dinesh Vasamshetty
 
PPTX
Microsoft/Zend Webcast on Cloud Computing
Josh Holmes
 
PPT
The complete ASP.NET (IIS) Tutorial with code example in power point slide show
Subhas Malik
 
PPT
Web Servers (ppt)
webhostingguy
 
PPTX
Chapter 26
application developer
 
PPTX
Wordpress on Windows
Josh Holmes
 
PPT
Understandingiis 120715123909-phpapp01
arunparmar
 
PDF
2009 - Microsoft IIS Vs. Apache - Who Serves More - A Study
Vijay Prasad Gupta
 
PPTX
Upgrade, Migrate and Virtualisation with SharePoint 2010
Alan Richards
 
PPTX
Windows Loves drupal
Alessandro Pilotti
 
PDF
Windows Loves Drupal
Acquia
 
PPSX
All About Asp Net 4 0 Hosam Kamel
Hosam Kamel
 
Build sites on iis
Paul Davis
 
IIS7 For Non IIS PFEs
Kenny Abdiel Maita
 
IIS 7.0 +
Muhammad Amir
 
introduction and configuration of IIS (in addition with printer)
Assay Khan
 
Understanding iis part1
Om Vikram Thapa
 
ASP.NET Request Processing Internals
Abhijit Jana
 
How to Monitor IIS
Power Admin LLC
 
Hosting a website on IIS Server
Dinesh Vasamshetty
 
Microsoft/Zend Webcast on Cloud Computing
Josh Holmes
 
The complete ASP.NET (IIS) Tutorial with code example in power point slide show
Subhas Malik
 
Web Servers (ppt)
webhostingguy
 
Wordpress on Windows
Josh Holmes
 
Understandingiis 120715123909-phpapp01
arunparmar
 
2009 - Microsoft IIS Vs. Apache - Who Serves More - A Study
Vijay Prasad Gupta
 
Upgrade, Migrate and Virtualisation with SharePoint 2010
Alan Richards
 
Windows Loves drupal
Alessandro Pilotti
 
Windows Loves Drupal
Acquia
 
All About Asp Net 4 0 Hosam Kamel
Hosam Kamel
 

Viewers also liked (15)

PDF
Internet Information Server (IIS)
Rosariio92
 
PPTX
Internet information services(iis)
Gabriel Alfredo Martinez Ochoa
 
PPT
IIS
Giritharan V
 
PPT
INTRODUCTION TO IIS
sanya6900
 
ODP
Apache ppt
poornima sugumaran
 
PPT
Service Oriented Development With Windows Communication Foundation 2003
Jason Townsend, MBA
 
PPT
Configuring iis on windows server 2008 for asp.net application
Abhijit B.
 
PPT
Nagios Conference 2011 - Tony Roman - Cacti Workshop
Nagios
 
PDF
Servidor HTTP en Windows (IIS)
Sergio Santos
 
PPT
Web Server Administration
webhostingguy
 
PPT
Web server administration
sawsan slii
 
PPT
IIS7 possibilities
Транслируем.бел
 
PDF
Building Testable PHP Applications
chartjes
 
PDF
上手なネット広告2014年版
Tomoaki Okamoto
 
Internet Information Server (IIS)
Rosariio92
 
Internet information services(iis)
Gabriel Alfredo Martinez Ochoa
 
INTRODUCTION TO IIS
sanya6900
 
Apache ppt
poornima sugumaran
 
Service Oriented Development With Windows Communication Foundation 2003
Jason Townsend, MBA
 
Configuring iis on windows server 2008 for asp.net application
Abhijit B.
 
Nagios Conference 2011 - Tony Roman - Cacti Workshop
Nagios
 
Servidor HTTP en Windows (IIS)
Sergio Santos
 
Web Server Administration
webhostingguy
 
Web server administration
sawsan slii
 
IIS7 possibilities
Транслируем.бел
 
Building Testable PHP Applications
chartjes
 
上手なネット広告2014年版
Tomoaki Okamoto
 
Ad

Similar to IIS 7: The Administrator’s Guide (20)

PPT
Make Web, Not War - Installfest: Extend Your Web Server, Rodney Buike
Make Web Not War
 
PPT
PHP on Windows 2008
jorke
 
PPT
Iis it-slideshares.blogspot.com
phanleson
 
PPT
Road Show Asp Net
Shihabudheen Web Developer
 
PPT
Windows Server 2008 - Web and Application Hosting
Information Technology
 
PPTX
Partying with PHP on Microsoft Internet Information Services 7
goodfriday
 
PDF
Web Server Hardening
n|u - The Open Security Community
 
DOCX
IIS 7.0 for Apache Administrators
butest
 
PPT
Windows Server 2008 for Developers - Part 1
ukdpe
 
PPT
Running PHP on Windows Technical Overview
Wes Yanaga
 
PPT
Microsoft, PHP and IIS7
Nick Hodge
 
PPTX
Bringing Hosters and Developers Together with IIS7
goodfriday
 
PPT
IIS 6.0 and asp.net
Rishi Kothari
 
DOCX
Comparing IIS and Apache - Questions and Answers
butest
 
PDF
CTU June 2011 - Things that Every ASP.NET Developer Should Know
Spiffy
 
DOC
Introduction To Iis 7
amit_monty
 
PDF
ITCamp 2011 - Alessandro Pilotti - Optimizing ASPNet and PHP apps on IIS 7.5
ITCamp
 
PPT
Windows Server 2008
Luis Quiroz
 
DOC
Create Applicationwith IIS 7
Sandeep Verma
 
PPTX
Php iis microsoft
Nick Hodge
 
Make Web, Not War - Installfest: Extend Your Web Server, Rodney Buike
Make Web Not War
 
PHP on Windows 2008
jorke
 
Iis it-slideshares.blogspot.com
phanleson
 
Road Show Asp Net
Shihabudheen Web Developer
 
Windows Server 2008 - Web and Application Hosting
Information Technology
 
Partying with PHP on Microsoft Internet Information Services 7
goodfriday
 
Web Server Hardening
n|u - The Open Security Community
 
IIS 7.0 for Apache Administrators
butest
 
Windows Server 2008 for Developers - Part 1
ukdpe
 
Running PHP on Windows Technical Overview
Wes Yanaga
 
Microsoft, PHP and IIS7
Nick Hodge
 
Bringing Hosters and Developers Together with IIS7
goodfriday
 
IIS 6.0 and asp.net
Rishi Kothari
 
Comparing IIS and Apache - Questions and Answers
butest
 
CTU June 2011 - Things that Every ASP.NET Developer Should Know
Spiffy
 
Introduction To Iis 7
amit_monty
 
ITCamp 2011 - Alessandro Pilotti - Optimizing ASPNet and PHP apps on IIS 7.5
ITCamp
 
Windows Server 2008
Luis Quiroz
 
Create Applicationwith IIS 7
Sandeep Verma
 
Php iis microsoft
Nick Hodge
 
Ad

More from Information Technology (20)

PDF
Sql Server Security Best Practices
Information Technology
 
PPT
SAN Review
Information Technology
 
PPT
SQL 2005 Disk IO Performance
Information Technology
 
PPT
RAID Review
Information Technology
 
PPT
Review of SQL
Information Technology
 
PPT
Sql 2005 high availability
Information Technology
 
PPT
MOSS 2007 Deployment Fundamentals -Part2
Information Technology
 
PPT
MOSS 2007 Deployment Fundamentals -Part1
Information Technology
 
PPT
Clustering and High Availability
Information Technology
 
PDF
F5 beyond load balancer (nov 2009)
Information Technology
 
PPT
WSS 3.0 & SharePoint 2007
Information Technology
 
PPT
SharePoint Topology
Information Technology
 
PDF
Sharepoint Deployments
Information Technology
 
PPT
Microsoft Clustering
Information Technology
 
PDF
Scalable Internet Servers and Load Balancing
Information Technology
 
PPT
Web Hacking
Information Technology
 
PPT
Migration from ASP to ASP.NET
Information Technology
 
PPT
Internet Traffic Monitoring and Analysis
Information Technology
 
PPT
Windows network security
Information Technology
 
Sql Server Security Best Practices
Information Technology
 
SQL 2005 Disk IO Performance
Information Technology
 
Review of SQL
Information Technology
 
Sql 2005 high availability
Information Technology
 
MOSS 2007 Deployment Fundamentals -Part2
Information Technology
 
MOSS 2007 Deployment Fundamentals -Part1
Information Technology
 
Clustering and High Availability
Information Technology
 
F5 beyond load balancer (nov 2009)
Information Technology
 
WSS 3.0 & SharePoint 2007
Information Technology
 
SharePoint Topology
Information Technology
 
Sharepoint Deployments
Information Technology
 
Microsoft Clustering
Information Technology
 
Scalable Internet Servers and Load Balancing
Information Technology
 
Migration from ASP to ASP.NET
Information Technology
 
Internet Traffic Monitoring and Analysis
Information Technology
 
Windows network security
Information Technology
 

Recently uploaded (20)

PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PDF
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
PPTX
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PPTX
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
PDF
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
PPTX
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PDF
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PDF
IoT-Powered Industrial Transformation – Smart Manufacturing to Connected Heal...
Rejig Digital
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PPTX
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
PDF
What Makes Contify’s News API Stand Out: Key Features at a Glance
Contify
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
PDF
Staying Human in a Machine- Accelerated World
Catalin Jora
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
IoT-Powered Industrial Transformation – Smart Manufacturing to Connected Heal...
Rejig Digital
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
What Makes Contify’s News API Stand Out: Key Features at a Glance
Contify
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
Staying Human in a Machine- Accelerated World
Catalin Jora
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 

IIS 7: The Administrator’s Guide

  • 1. IIS 7: The Administrator’s Guide Alexis Eller Program Manager Microsoft Corporation
  • 2. Scripting… WMI C#, VB.NET… Microsoft.Web.Administration Command Line… appcmd Server Modules ASP.NET on IIS7 Centralization Detailed Errors Failed Request Tracing IIS Manager Deploy... Manage... Troubleshoot...
  • 3. IIS6 Request Processing Send Response Log Compress NTLM Basic Determine Handler CGI Static File Authentication Anon Monolithic implementation Install all or nothing … Extend server functionality only through ISAPI … ASP.NET PHP ISAPI … … Deploy...
  • 4. IIS7 Request Processing Send Response Log Compress NTLM Basic Determine Handler CGI Static File ISAPI Authentication Anon SendResponse Authentication Authorization ResolveCache ExecuteHandler UpdateCache … … Server functionality is split into ~ 40 modules ... Modules plug into a generic request pipeline… Modules extend server functionality through a public module API. … … Deploy...
  • 5. Many, Many Modules Install, manage, and patch only the modules you use… Reduces attack surface Reduces in-memory footprint Provides fine grained control … replace core server components with custom components … Deploy...
  • 7. Consistently install the same set of modules … 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] TIP Deploy...
  • 8. IIS6 ASP.NET Integration Runtime limitations Only sees ASP.NET requests Feature duplication Send Response Log Compress NTLM Basic Determine Handler CGI Static File ISAPI Authentication Anon … … Deploy... Authentication Forms Windows Map Handler ASPX Trace … … … aspnet_isapi.dll
  • 9. IIS7 ASP.NET Integration Two Modes Classic (runs as ISAPI) Integrated Integrated Mode .NET modules / handlers plug directly into pipeline Process all requests Full runtime fidelity Log Compress Basic Static File ISAPI Anon SendResponse Authentication Authorization ResolveCache ExecuteHandler UpdateCache … … Authentication Forms Windows Map Handler ASPX Trace … … … aspnet_isapi.dll Deploy...
  • 10. Migrating to Integrated ASP.NET Deploy...
  • 11. 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 IIS config  web.config, XCOPY with application Deploy...
  • 12. Centralize Content and Config IIS config  web.config, centralize on file server 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 Deploy...
  • 13. Configuration moves to .config files… Configure IIS and ASP.NET properties in the same file Use locking to provide delegation Built for simple, schema-based extensibility … welcome to a world of xcopy deployment … Manage...
  • 14. Configuration Layout root configuration files machine.config root web.config applicationHost.config web.config .NET Framework ASP.NET IIS IIS + ASP.NET + .NET Framework web.config files \Windows\Microsoft.NET\Framework\v2.0.50727\config\web.config \Windows\system32\inetsrv\applicationHost.config \Windows\Microsoft.NET\Framework\v2.0.50727\config\machine.config Inheritance… Manage...
  • 15. Configuration Delegation Delegation is: Configuration locking, “overrideMode” ACL’s on configuration files By default… All IIS sections locked except: Default Document Directory Browsing HTTP Header HTTP Redirects All .NET Framework / ASP.NET sections are unlocked Manage...
  • 16. Determine your configuration lockdown policy… Be conservative at first Unlock as necessary (locking later could break apps) TIP Manage...
  • 17. Compatibility: ABO Mapper Provides compatibility for: scripts command line tools native calls into ABO Not installed by default Can only do what IIS6 could do… Can’t read/write new IIS properties Application Pools: managedPipelineMode, managedRuntimeVersion Request Filtering Failed Request Tracing Can’t read/write ASP.NET properties Can’t read/write web.config files Can’t access new runtime data, e.g. worker processes, executing requests applicationHost.config IISADMIN ABOMapper IIS6 ADSI Script Manage...
  • 18. Management Tools Manage IIS and ASP.NET View enhanced runtime data worker processes, appdomains, executing requests Manage delegation Use whichever management tool suits your needs… GUI Command Line Script Managed Code IIS Manager appcmd WMI (root\WebAdministration) Microsoft.Web.Administration Manage...
  • 19. IIS Manager Remotes over HTTP, making it firewall friendly (remoting is not installed by default) Provides managed extensibility Supports non-admin management of sites and applications Manage...
  • 20. Educate end users who publish their application and use IIS Manager configure it… 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** TIP Manage...
  • 21. Appcmd – Listing and Filtering C:\> appcmd list sites SITE &quot;Default Web Site&quot; (id:1,bindings:HTTP/*:80:,state:Started) SITE &quot;Site1&quot; (id:2,bindings:http/*:81:,state:Started) SITE &quot;Site2&quot; (id:3,bindings:http/*:82:,state:Stopped) C:\> appcmd list requests REQUEST &quot;fb0000008000000e&quot; (url:GET /wait.aspx?time=10000,time:4276 msec,client:localhost) C:\> appcmd list requests /apppool.name:DefaultAppPool C:\> appcmd list requests /wp.name:3567 C:\> appcmd list requests /site.id:1 C:\> C:\> Filter results by application pool, worker process, or site C:\> Manage...
  • 23. Scripting: IIS6 WMI Provider Set oIIS = GetObject(&quot;winmgmts:root\MicrosoftIISv2&quot;) ' Create binding for new site Set oBinding = oIIS.Get(&quot;ServerBinding&quot;).SpawnInstance_ oBinding.IP = &quot;&quot; oBinding.Port = &quot;80&quot; oBinding.Hostname = &quot;www.site.com&quot; ' Create site and extract site name from return value Set oService = oIIS.Get(&quot;IIsWebService.Name='W3SVC'&quot;) strSiteName = oService. CreateNewSite (&quot;NewSite&quot;, array (oBinding), &quot;C:\inetpub\wwwroot&quot;) Set objPath = CreateObject(&quot;WbemScripting.SWbemObjectPath&quot;) objPath.Path = strSiteName strSitePath = objPath.Keys.Item(&quot;&quot;) Set oSite = oIIS.Get(&quot;IIsWebServer.Name='&quot; & strSitePath & &quot;'&quot;) oSite.Start ' Create the vdir for our application Set oVDirSetting = oIIS.Get(&quot;IIsWebVirtualDirSetting&quot;). SpawnInstance_ oVDirSetting.Name = strSitePath & &quot;/ROOT/bar&quot; oVDirSetting.Path = &quot;C:\inetpub\bar&quot; oVDirSetting.Put_ ' Make the VDir an application Set oVDir = oIIS.Get(&quot;IIsWebVirtualDir.Name='&quot; & strSitePath & &quot;/ROOT/bar'&quot;) oVDir. AppCreate2 1 Create Site Create Virtual Directory Create Application NOT CONSISTENT Manage...
  • 24. Scripting: new WMI Provider Set oService = GetObject(&quot;winmgmts:root\WebAdministration&quot;) ' Create binding for site Set oBinding = oService.Get(&quot;BindingElement&quot;).SpawnInstance_ oBinding.BindingInformation = &quot;*:80:www.site.com&quot; oBinding.Protocol = &quot;http&quot; ' Create site oService.Get(&quot;Site&quot;).Create _ &quot;NewSite&quot;, array (oBinding), &quot;C:\inetpub\wwwroot&quot; ' Create application oService.Get(&quot;Application&quot;).Create _ &quot;/foo&quot;, &quot;NewSite&quot;, &quot;C:\inetpub\wwwroot\foo&quot; Static Create methods CONSISTENT Manage...
  • 25. WMI – Unloading AppDomains …through script …through PowerShell Manage...
  • 26. Coding: Microsoft.Web.Administration ServerManager iisManager =  new  ServerManager(); foreach (WorkerProcess w3wp  in   iisManager.WorkerProcesses ) {     Console.WriteLine(&quot;W3WP ({0})&quot;, w3wp.ProcessId);                   foreach (Request request  in   w3wp.GetRequests (0)) {         Console.WriteLine(&quot;{0} - {1},{2},{3}&quot;,                     request.Url,                     request.ClientIPAddr,                     request.TimeElapsed,                     request.TimeInState);     } } Manage...
  • 27. New Troubleshooting Features Detailed custom errors, just like ASP.NET Failed Request Tracing No more ETW tracing and waiting for a repro… New runtime data: worker processes appdomains currently executing requests Troubleshoot...
  • 28. Failed Request Tracing No-repro tracing for “failed requests” Configure custom failure definitions per URL Time taken Status/substatus codes Error level Persist failure log files Will it tell me what’s wrong? Sometimes… for example, ACL issues Look for clues Can use for all requests to see what’s going on Troubleshoot...
  • 29. Failed Request Tracing Troubleshoot...
  • 30. Summary Troubleshoot… Use: Detailed Errors, Failed Request Tracing, Currently Executing requests Manage… Manage IIS and ASP.NET through the same tools Use ABO Mapper compatibility (not installed by default) Determine configuration lockdown policy Deploy… ~ 40 modules, install only what you need Migrate to ASP.NET Integrated Mode Easier centralization/replication
  • 32. TechCenter to easily find the info you need Advice and assistance in Forums Insider info on new technology (IIS7!) Online labs, play with IIS7 in your browser New home for IIS Community!
  • 33. Some upcoming IIS sessions… Today 3:15 – 4:30 Chalktalk: Configuration Management of Web Platform 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
  • 34. Fill out a session evaluation on CommNet and Win an XBOX 360!
  • 35. © 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.
  • 37. Installation Options Server Manager Package Manager Server Manager Lots of components Static server by default [client] Use Windows Features Package Manager Replaces sysocmgr Unattend File format is completely different [client] Pick components, cannot set configuration Deploy...
  • 38. 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 Deploy...
  • 39. 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 Deploy...
  • 40. 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) Deploy...
  • 41. Configuration Delegation Two kinds of configuration locking: overrideMode (similar to &quot;allowOverride&quot;) 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 Determine your configuration lockdown policy be conservative at first unlock as necessary (locking later could break apps) Manage...
  • 42. Configuration Schema Use the schema file to see all config settings: %windir%\system32\inetsrv\config\schema\IIS_schema.xml Schema describes: property types default values validation encrypted by default? note: config is case sensitive Manage...
  • 43. Appcmd – Viewing Config Schema C:\> appcmd list config /section:? | findstr system.webServer system.webServer/globalModules system.webServer/serverSideInclude system.webServer/httpTracing ... C:\> appcmd list config /section:directoryBrowse <system.webServer>   <directoryBrowse enabled=&quot;true&quot; /> </system.webServer> C:\> appcmd list config /section:directoryBrowse /config:* <system.webServer>   <directoryBrowse enabled=&quot;true&quot; showFlags=&quot;Extension, Size, Time, Date&quot; /> </system.webServer> C:\> appcmd list config /section:directoryBrowse /text:* CONFIG   CONFIG.SECTION: system.webServer/directoryBrowse   path: MACHINE/WEBROOT/APPHOST   overrideMode: Inherit   [system.webServer/directoryBrowse]     enabled:&quot;true&quot;     showFlags:&quot;Extension, Size, Time, Date&quot; C:\> C:\> IIS sections – also try “system.web” and “system.applicationHost” C:\> C:\> Shows attributes that aren’t set explicitly Manage...
  • 44. Coding: Microsoft.Web.Administration First managed code API for administering IIS Same objects and functionality as WMI, appcmd What about System.Configuration? System.Configuration: Strongly typed ASP.NET and .NET Framework config Microsoft.Web.Administration: Weakly typed IIS, ASP.NET, and .NET Framework config Strongly typed IIS objects like Sites and Application Pools Manage...

Editor's Notes

  • #7: 05/14/10 14:23 © 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.
  • #11: 05/14/10 14:23 © 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.
  • #14: Themes of IIS7 was merger with ASP.NET
  • #23: 05/14/10 14:23 © 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.
  • #26: 05/14/10 14:23 © 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.
  • #30: 05/14/10 14:23 © 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.
  • #33: IIS.net slide
  • #34: Upcoming sessions slide
  • #36: 05/14/10 14:23 © 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.
  • #38: 05/14/10 14:23 © 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.