Lap around IIS7 - MD ColdFusion User's Group

Download Report

Transcript Lap around IIS7 - MD ColdFusion User's Group

Lap around IIS7
Ashish Jaiman
ISV AE
[email protected]
Microsoft Confidential
IIS 6 Today: A Proven Platform
• Proven Scalability
• MySpace - 23 Billion Page* Views/Month
• Microsoft.com - 10k Req/sec & 300K Connections
• Match.com 30 million page view daily
• Proven Security
• No critical IIS 6 hotfixes since RTM*
• Proven Trust
• 54% of Fortune 1000 use IIS (port80software.com)
• A solid foundation to build on.
*(as of Nov 28th 2006)
Internet Information Services (IIS) 7.0
More than a Web server, Internet Information Services 7.0 provides an
accessible, extensible platform for developing and reliably hosting Web
applications and services.
Create
Streamlined
Servers
IIS 7.0 Enhancements
Modular Architecture
Extensible Design
Integrated with .NET
Manageable
Built in Request Tracing
Reduced
Attack
Surface
Rapid
Application
Deployment
Extend/Modify
IIS Features
Fast
Diagnostics
Modular Design
• Modular Pipeline
•
Features are provided in discrete modules
•
Remove or replace modules as you see fit
•
•
•
Reduce security exposure
Reduce memory footprint
Increase performance
• Add Custom Modules in native or manage code
•
•
•
Leverage the power of .NET for all content
Integrate with specialized infrastructure
Easily incorporate new technologies
• Modular UI
• Add custom pages to UI (Winforms)
• Integrate Application configuration with IIS
IIS6 Request Processing
Authentication
NTLM
Basic
Anon
…
Monolithic implementation
Install all or nothing…
CGI
Determine
Handler
Static
File
ASP.NET
ISAPI
…
PHP
Send Response
Log
Compress
Extend server functionality only
through ISAPI…
IIS7 Request Processing
Authentication
NTLM
Basic
Server functionality is split
into ~ 40 modules...
Anon
Authorization
…
ResolveCacheCGI
…
Determine
Static
File
Handler
ExecuteHandler
ISAPI
…
…
UpdateCache
Send Response
SendResponse
Log
Compress
Modules plug into a
generic request pipeline…
Modules extend server
functionality through a
public module API.
IIS 7 Modularity
Extensibility
• IIS 6
•
•
•
•
IIS 6 extensibility limited to ISAPI filter and extensions
UI modifications in MMC are challenging
Difficult to extend IIS 6 Schema
Web service activation using http only
• IIS 7
•
•
•
•
•
Custom native or manage code modules and handlers
Easy to add your apps to UI
Simple to extend IIS 7 schema
Instrument apps to integrate with IIS 7 tracing
Host web services using non-http protocols
IIS 7 Extensibility
.NET Integration
• Simplifies security and administration
• Leverage the power of .NET for all content
with managed global modules
•
•
•
•
Forms Authentication
URL Authorization
.NET Caching
.NET Role and Membership Providers
• New APIs manage both IIS 7 and .NET
• Enables Xcopy deployment scenarios
IIS6 ASP.NET Integration
• Runtime limitations
• Only sees ASP.NET
requests
• Feature duplication
Authentication
NTLM
Basic
Anon
…
Determine
Handler
CGI
aspnet_isapi.dll
Static
File
Authentication
Forms
…
ISAPI
ASPX
…
Send Response
Log
Windows
Compress
Map
Handler
Trace
…
…
IIS7 ASP.NET Integration
Basic
Anon
• Classic Mode
Authentication
• runs as ISAPI
Authorization
• Integrated Mode
ResolveCache
…
ExecuteHandler
Static
File
…
ISAPI
UpdateCache
SendResponse
• aspnet_isapi.dll
.NET modules /
handlers plug
Authentication
Forms
Windows
directly
into pipeline
…
• Process
all requests
ASPX
Map
Trace
•Handler
Full runtime
fidelity
…
Compress
Log
…
IIS 7 .NET Integration
Management Tools
GUI
Command Line
Script
Managed Code
IIS Manager
appcmd
WMI (root\WebAdministration)
Microsoft.Web.Administration
• Manage IIS and ASP.NET
• View enhanced runtime data
•
worker processes, appdomains, executing requests
• Manage delegation
• Use whichever management tool suits your needs…
• Note: Powershell has recently been added to the tools you
can use! See http://iis.net for details
Coding:
Microsoft.Web.Administration
New APIs enable developers to write tools to deploy,
manage, and troubleshoot ASP.NET and IIS
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);
}
}
IIS 7 Management
Rapid Troubleshooting with
Failed Request Tracing
• Significantly reduce need for “crash dump
analysis”
• Configure custom failure definitions per URL
• Time taken
•
“Write Trace log for 200 (ok) response taking over 15 seconds
• HTTP Status/substatus codes
•
“Write Trace log when you see a 500 error for Invoice.aspx”
• Error level
• Manage with UI, WMI, API, Appcmd
• Instrument applications with custom trace event
Failed Request Tracing
Hosting Web Services in IIS 7
• Windows Communication Foundation (WCF) is
part of .NET 3.0
• IIS 7 will host web service in worker process
• Health of worker process is managed by Web
Activation Service (WAS)
• Provides “external” monitoring and recycling
• Activate over TCP, Named Pipe, MSMQ, or HTTP
• Web Service can share state with an ASP.net
application
• Provides high availability, managed process for
web service based applications
Web Service Activation
Summary
• Custom modules and handlers
• Create new IIS 7 modules for the public
• Provide solutions for customers with unique
requirements (ie. Custom authentication, auditing …)
• Extend reach of existing .NET handlers and modules to
non ASP.NET content
• Quickly integrate new technologies
•
•
•
•
•
Extend UI / Schema: integrated administration
Deploy using new APIs
Manage with delegated administration
Diagnose with built in / extensible tracing
Provide high availability host for web services