bernhard frank web platform architect evangelist microsoft corporation

32
Internet Information Services 7 { overview } Bernhard Frank Web Platform Architect Evangelist Microsoft Corporation

Upload: willafried-laib

Post on 06-Apr-2015

115 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: Bernhard Frank Web Platform Architect Evangelist Microsoft Corporation

Internet Information Services 7 { overview }Bernhard Frank

Web Platform Architect EvangelistMicrosoft Corporation

Page 2: Bernhard Frank Web Platform Architect Evangelist Microsoft Corporation

Agenda

KonfigurationAdministrationArchitekturSicherheitErweiterbarkeitTroubleshooting & DiagnoseWeiteres

Page 3: Bernhard Frank Web Platform Architect Evangelist Microsoft Corporation

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

Page 4: Bernhard Frank Web Platform Architect Evangelist Microsoft Corporation

IIS7 “Shared Configuration”Websites auf n-WebserverIdeal für Serverfarmen / LB Szenarien / MigrationEine Konfigurations-Datei

ApplicationHost.config

Page 5: Bernhard Frank Web Platform Architect Evangelist Microsoft Corporation

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:

Page 6: Bernhard Frank Web Platform Architect Evangelist Microsoft Corporation

{ konfiguration }

IIS MMCWeb.configDelegation

Demo

Page 7: Bernhard Frank Web Platform Architect Evangelist Microsoft Corporation

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

Page 8: Bernhard Frank Web Platform Architect Evangelist Microsoft Corporation

AdministrationRückblick: Die ‘alte’ IIS 6 Management Console

Nur für Administratoren!Wenig ergonomische UI (“…wo war nochmal…”)Zuviele RegisterDCOM remoting

Page 9: Bernhard Frank Web Platform Architect Evangelist Microsoft Corporation

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.

Page 10: Bernhard Frank Web Platform Architect Evangelist Microsoft Corporation

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 ]*

Page 11: Bernhard Frank Web Platform Architect Evangelist Microsoft Corporation

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)

Page 12: Bernhard Frank Web Platform Architect Evangelist Microsoft Corporation

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

Page 13: Bernhard Frank Web Platform Architect Evangelist Microsoft Corporation

{ administration }

Remote Administrationappcmd.exepowershellusing Microsoft.Web.Administration;

Demo

Page 14: Bernhard Frank Web Platform Architect Evangelist Microsoft Corporation

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

Page 15: Bernhard Frank Web Platform Architect Evangelist Microsoft Corporation

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.

Page 16: Bernhard Frank Web Platform Architect Evangelist Microsoft Corporation

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

Page 17: Bernhard Frank Web Platform Architect Evangelist Microsoft Corporation

{ architektur }

Modul Verwaltung

Demo

Page 18: Bernhard Frank Web Platform Architect Evangelist Microsoft Corporation

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

Page 19: Bernhard Frank Web Platform Architect Evangelist Microsoft Corporation

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)

Page 20: Bernhard Frank Web Platform Architect Evangelist Microsoft Corporation

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>

Page 21: Bernhard Frank Web Platform Architect Evangelist Microsoft Corporation

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 “)

Page 22: Bernhard Frank Web Platform Architect Evangelist Microsoft Corporation

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

Page 23: Bernhard Frank Web Platform Architect Evangelist Microsoft Corporation

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

Page 24: Bernhard Frank Web Platform Architect Evangelist Microsoft Corporation

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.

Page 25: Bernhard Frank Web Platform Architect Evangelist Microsoft Corporation

{ erweiterbarkeit }

ASP.net Http Module

Demo

Page 26: Bernhard Frank Web Platform Architect Evangelist Microsoft Corporation

Fehlerdiagnose und TroubleshootingIIS Probleme

IIS HangsIIS stürzt ab100% CPUMemory LeaksRequest braucht zulangeRequest kommt mit Fehler zurück

Page 27: Bernhard Frank Web Platform Architect Evangelist Microsoft Corporation

{ troubleshooting }

Workerprozess-StatusEvent-Tracing

Demo

Page 28: Bernhard Frank Web Platform Architect Evangelist Microsoft Corporation

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

Page 29: Bernhard Frank Web Platform Architect Evangelist Microsoft Corporation

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

Page 30: Bernhard Frank Web Platform Architect Evangelist Microsoft Corporation

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

Page 31: Bernhard Frank Web Platform Architect Evangelist Microsoft Corporation

Weitere Informationen

Fiddlertool (local http monitoring tool)IIS Website www.iis.net

Page 32: Bernhard Frank Web Platform Architect Evangelist Microsoft Corporation

© 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.