Internet Information Services 7 { overview }Bernhard Frank
Web Platform Architect EvangelistMicrosoft Corporation
Agenda
KonfigurationAdministrationArchitekturSicherheitErweiterbarkeitTroubleshooting & DiagnoseWeiteres
IIS7 Konfiguration
Machine.config
Root Web.config
ApplicationHost.config
Web.config
.NET Framework ASP.NET
IIS7
IIS + ASP.NET + .NET Framework
ASP.NET +.NET Framework
Integration von bekanntem (.NET config)<system.webServer>
Mit neuemApplicationhost.config
IIS7 “Shared Configuration”Websites auf n-WebserverIdeal für Serverfarmen / LB Szenarien / MigrationEine Konfigurations-Datei
ApplicationHost.config
IIS 7 – Konfigurations-Schema
<handlers> <add name=“ASPClassic” path=“.asp” verb=“GET,HEAD,POST,TRACE” scriptProcessor=“D:\WINDOWS\system32\inetsrv\asp.dll” resourceType=“File” /> <add name="PHP with FastCGI" path="*.php" verb="*“ modules="FastCgiModule" scriptProcessor="C:\php\php- cgi.exe" resourceType="Unspecified" />
< … other elements here … />
</handlers>
IIS 7.0 Applicationhost.config:
{ konfiguration }
IIS MMCWeb.configDelegation
Demo
IIS 7 - Konfiguration
Klares XML SchemaDelegierbar
IIS Konfigurationen an den Entwickler übertragen.Server-Admin bestimmt welche Features delegiert werden.Editieren mit dem Texteditor, die API oder das Admin-Tool.
Einheitlichtes Konfigurations-Model für IIS und ASP.net
API für Zugriff auf die Konfiguration“xcopy deployment” (Konfiguration neben Inhalten)
Erweiterbar und Anpassungsfähig
AdministrationRückblick: Die ‘alte’ IIS 6 Management Console
Nur für Administratoren!Wenig ergonomische UI (“…wo war nochmal…”)Zuviele RegisterDCOM remoting
Die Neue …
IIS und ASP.NET Einstellungen an einer Stelle vorzunehmen. Die ‘Lebenszeichen’ der Websites zu überprüfen. Die Verwaltung remote durchzuführen. Die UI zu erweitern und eigene Verwaltungs-Funktionen einzubauen.
appcmd.exeThe General purpose IIS command line administration tool
%windir%\System32\inetsrvAnlegen und Konfigurieren (von Websites, Applications, Pools, Backups und virtuellen Directories)Starten und Stoppen von Websites und recyclen von PoolsGegenwärtig ausgeführten http-AnfragenSuchen, manipulieren, exportieren und importieren von IIS und ASP.net Einstellungen APPCMD.EXE <COMMAND> <OBJECT> <ID> [ /parameter:value ]*
Powershell
“Next generation shell” Objekt orientiertKombiniert die Idee einer Shell mit einer mächtigen Skript SpracheAuch komplexe Aufgaben können einfach ”komponiert” werdenGut für iterative tasks geeignetPowershell Commands haben die Syntax: Verb – Substantiv (Aktion – Ziel)
Using Microsoft.Web.Administration
IIS7 über Managed code verwaltenZugriff auf applicationHost.config und web.configAnlegen von neuen Sites, Dirs, Apps, AppPoolsRecyclen von AppPoolsGegenwärtig ausgeführte Requests anzeigen
{ administration }
Remote Administrationappcmd.exepowershellusing Microsoft.Web.Administration;
Demo
ISAPI Filter Notifications
url map
authe req log
end net session
Pre proc headers
determine handler
logging
custom errors
compression
authentication
IIS 6 Architektur (Rückblick)
iiscorehandlers
aspnet_isapi.dll
IHttpModule Events
IHttpHandlers
• Monotolithischer Ansatz:
• Duplizierung von Features zwischen
• IIS und ASP.net
• Feature sind abhängig von ihrer Position in der Pipeline.
•ASP.NET Funktionalität gilt nicht für alle anderen Inhaltstypen (z.B. statische Requests)
w3wp.exe
http.sys
cgi
w3svc
static file
isapi ext
PageHandlertrace.axd
end req
update cacherel req state
url map
begin req
authe req
autho req
cache
handler map
handler exec
IIS 7 Architektur (integrated)
http.sys
w3svc
end
logging
update cache
release state
execute handlerpre execute
handleracquire state
map handler
resolve cache
authorize
authenticate
begin
Native Module
IHttpModule
basic auth
digest authwindows
auth
url autho
role mgr
forms auth
Other native modules
cgistatic file
isapi ext
*.aspx trace.axd
Integrated pipeline
Native or Managed Handlers
•Eine Request pipeline.
• Alle Funktionen werden durch in sich geschlossene Module abgebildet.
•Module können auf native- oder managed-Code basieren.
• Alle Funktionen können somit auf alle Anfragen ausgeführt werden.
IIS7 Module (integrated)
Http Protocol SupportValidationRangeModule TraceVerbModule
OptionsVerbModule ProtocolSupportModule
Logging and Diagnostics
HttpLoggingModule
CustomLoggingModule
Configuration and Metadata CachesTokenCacheModule UriCacheModule
SiteCacheModule FileCacheModule
Core Web ServerDirectoryListingModule CustomErrorModule
DynamicCompressionModule StaticCompressionModule
StaticFileModule DefaultDocumentModule
HttpCacheModule
RequestMonitorModule
TracingModule
AuthN/AuthZBasicAuthModule
DigestAuthModule
WindowsAuthModule
CertificateAuthModule
AnonymousAuthModule
AccessCheckModule
UrlAuthorizationModule
Extensibility
ISAPIModule
ISAPIFilterModule
CGIModule
ServerSideIncludeModule
ManagedEngineModule
PublishingDavModule
RequestForwarderModule
HttpRedirectionModule RequestFilteringModule
{ architektur }
Modul Verwaltung
Demo
IIS7 Design-Änderungen
Funktionalität -> Module Keine w3core.dllFreies Zuschalten und Entfernen aller Module.Speicherbedarf und Angriffsfläche konfigurierbar.Anpassen der Site auf die Anforderungen.
Eine Request-Pipeline (integrated mode):
Vereinheitlicht ASP.NET und IIS EventsAufgaben können auf alle Inhaltstypen angewendet werden. Keine Duplizierung von Events
SicherheitUser Accounts
IUSR_%machine%
IUSR
IIS_WPG IISUsers
IIS6 IIS7
Anonymer User
Application Pool Gruppe
Builtin, nicht lokalisierte AccountsKeine Probleme mit Password expirationXcopy | klonen möglich (Konfig, Ownership & NTFS Rechte)
SicherheitAuthorisierung
IIS6 IIS7ACLs Web
Permissions IP Restrictions
+= URL basierend
Authorisierung
URLAuthorizationModuleAuf Basis “users”, “roles” und “verbs”Beispiel (Web.config):
<system.webServer> <security> <authorization> <clear /> <add accessType="Allow" users="bfrank" /> <add accessType="Deny" users="test" /> </authorization> </security></system.webServer>
SicherheitHTTP- Filter
IIS6 IIS7
UrlScan (ISAPI)*
Request Filter (Builtin)
Filter
*) zusätzliche zu installierende Komponente
RequestFilteringModule (modrqflt.dll)Regeln basieren z.B. auf :
URL, extensions (.exe), verbs, URL-Sequenzen, Max Content, Max Query String, High bit chars,...
X-copy Konfiguration (web.config)User: 404 „file not found“Log: Substatus
z.B 404.10 „REQUEST_HEADER_TOO_LONG “)
Sicherheit
w3core.dllFeatures nur konfigurierba
r
Einzeln installier-,
konfigurierbar
(Authbas.dll, Authcert.dll,
Authsspi.dll,…)
Für alle Anfragen
ISAPI(z.B. eigene
Authentifizierung)
+= ASP.net http Modul
IIS6 IIS7
Erweiterbarkeit
Modularität
Komplex, unterschiedliche Ansätze für ASP.net,
ASP, u.a.
Vereinheitlicht.
Application Pool Identity
Sandboxing (ASP.net, PHP, ASP,…)
Impersonate Anonymous User -> Account
ErweiterbarkeitIIS 7 APIs
Server Management.NET
WMI
Configuration.NET
C++
Runtime State & Control (RSCA)C++
Core Server Module.NET
C++
GUI Extension .NET
Configuration Files
XML Schema
Erweitern der Serverfunktionalität
Public APIIIS7 – Builtin-Modules basieren daraufErweiterung der ASP.NET APINative-Code API-Erweiterungen
Reichhaltiger und einfacher als ISAPI.Übereinstimmendes Objektmodell mit ASP.NET APIs.
{ erweiterbarkeit }
ASP.net Http Module
Demo
Fehlerdiagnose und TroubleshootingIIS Probleme
IIS HangsIIS stürzt ab100% CPUMemory LeaksRequest braucht zulangeRequest kommt mit Fehler zurück
{ troubleshooting }
Workerprozess-StatusEvent-Tracing
Demo
IIS 7 Diagnose Features
Statusinformationen von Websites, AppPools, w3wp‘s und AppDomainsGegenwärtig ausgeführte Anfragen„Request-Flugschreiber“Gemeinsames Trace-Log (IIS / ASP.net)Automatisches ÜberwachenZugriff auf Tracing API aus eigenen Komponenten
IIS7 FastCGI
Built-in support für FastCGI Applikationen
Internet standard, für dynamische Sprachen (CGI) z.B. PHP, Ruby, PERLWiederverwendbare CGI Prozesse für mehrere AnfragenOptimiert auf Leistung und Zuverlässigkeit.Bis zu 25x schneller als Standard CGI
Last- und Zuverlässigkeits-Tests auf BasisPHP 5.2.1, PHP 4.x
IIS7 Output Caching
Built-in caching für dynamischen Antworten
Kernel & User mode cachingKernel ist schneller – (!Authentifizierung)
UI Unterstützung für Caching RichtlinienvaryByQueryString, varyByHeadersCacheUntilChange, CacheForTime Period
Weitere Informationen
Fiddlertool (local http monitoring tool)IIS Website www.iis.net
© 2007 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.