Internet Information Services (IIS) 7.0 for ASP.Net Developers

Download Report

Transcript Internet Information Services (IIS) 7.0 for ASP.Net Developers

Internet Information Services
(IIS) 7.0 for ASP.Net
Developers
Andrew Westgarth
Chairman and North East Regional Coordinator
VBUG
[email protected]
www.vbug.com
About Me
ASP.Net Code Monkey
VBUG North East Regional Coordinator
Live in Sunderland!
Huge Sunderland A.F.C. Supporter
Very Interested in Wartime exploits of 617
Squadron – The Dam Busters
IMTC 2008 | Session XXXX
imtc.firstport.ie
Agenda

Overview and Availability

Architecture

Administration

Configuration

Componentization

Extensibility Model

Troubleshooting and Diagnostics

Conclusions

Questions

Resources
IMTC 2008 | Session XXXX
imtc.firstport.ie
Overview

Most significant release of IIS since IIS 1.0
Available on Windows Vista and Windows
Server 2008

First time development and server platform
versions of IIS aligned


ASP.Net Integrated Pipeline
New
extensibility model
Expanded
IMTC 2008 | Session XXXX
Productivity Support
imtc.firstport.ie
Availability in Vista SKUs

Not Available in Vista Home Basic

Parts Available in Vista Home Premium


No FTP Server, Advanced Web Authentication
and Authorization, no Remote Administration

Simultaneous Request Limit = 3
All elements of IIS7 found in Windows Server
2008 are available in the Vista Pro SKUs
(Business, Enterprise and Ultimate) with the
exception of Remote Administration
IMTC 2008 | Session XXXX
imtc.firstport.ie
IIS 6 Architecture
Authentication
NTLM
Basic
Anon
Aspnet_isapi.dll
CGI
Authentication
Forms
Static
File
Determine
Handler
Windows
...
ASPX
ASP.Net
ISAPI
PHP
Map
Handler
Trace
...
Send Response
Log
...
Compress
IMTC 2008 | Session XXXX
imtc.firstport.ie
IIS6 Request Handling
w3wp.exe
Handlers
CGI
Static File
Aspnet_isapi.dll
IHttpModule Events
ISAPI EXT
url map
Begin req
Auth‘c req
Auth’z req
Resolve cache
End req
Handler map Update req cache
Handler exec
Rel req state
Determine handler
logging
Custom errors
compression
authentication
ISAPI Filter Notification
url map
Auth c’req
log
Pre-Proc Headers
End Net Session
IHttpHandlers
Trace.axd
Page Handler
http.sys
IMTC 2008 | Session XXXX
imtc.firstport.ie
IIS 7 Architecture
HTTP Request
Basic
Authentication
Forms
Anon
Windows
...
ASPX
Execute Handler
...
Static
File
Trace
...
Send Response
Compres
s-ion
Log
HTTP Response
IMTC 2008 | Session XXXX
imtc.firstport.ie
Administration

New Administration UI

New Command Line Utility – appcmd.exe

New Managed DLL –
Microsoft.Web.Administration

Can Be Delegated

Server can be managed Remotely
IMTC 2008 | Session XXXX
imtc.firstport.ie
Delegated Administration

Server Administration can be delegated via
configuration


Allows Administrators to enable others to control
aspects of configuration
Remote Administration of IIS in Windows
Server 2008
IMTC 2008 | Session XXXX
imtc.firstport.ie
Your Logo
Goes Here
DEMO – IIS 7 Administration
Componentization

IIS 7 Now Fully Modular

Can have very small server footprint


Customise to only install/enable features you
want to have running
Therefore only patch what you need/use
IMTC 2008 | Session XXXX
imtc.firstport.ie
Components of IIS 7
Security
Health and
Diagnostics
FTP Publishing
BasicAuthMode
Application
Development
DigestAuthMode
NetFxExtensibility
HttpLoggingModule
FTP Management
WindowsAuthMode
ISAPIModule
CustomLoggingModule
CertificateAuthMode
ISAPIFilterModule
RequestMonitorModule
AnonymousAuthMode
CGIModule
HttpTracingModule
IPSecurityModule
ServerSideIncludeModule
UrlAuthorizationModule
ASP
RequestFilteringModule
ASP.Net
ODBCLogging
LoggingLibraries
FTP Server
Performance
Static Compression
Dynamic Compression
Management
ManagementConsole
ManagementScripting
Common HTTP Web Server Components
StaticFileModule
DefaultDocumentModule
HttpRedirect
DirectoryListingModule
CustomErrorModule
Windows Process Activation Service
ProcessModel
IMTC 2008 | Session XXXX
NetFxEnvironment
ConfigurationAPI
ManagementService
Metabase
WMICompatability
LegacyScripts
LegacySnap-In
imtc.firstport.ie
Configuration




No more Metabase!!!
Compatability – old metabase pushed to new
config – same property names
Central File – ApplicationHost.config

Strongly typed Schema

Uses same methodology as ASP.Net .config files
Distributed Configuration
IMTC 2008 | Session XXXX
imtc.firstport.ie
Your Logo
Goes Here
DEMO – Configuration
Extensibility Model

IIS 6 – ISAPI Filter and Extensions

IIS 7 – Brand New Win32 Native Interface



All IIS Modules written using this interface

IIS Team uses this API just as you WILL!
Full ASP.Net 2.0 Support

IHttpModule available supported today!

ASP.Net 2.0 Handlers run same as today!
IIS Manager (UI)


Extend using .Net 2.0
Diagnostics

Add Own events directly into pipeline (System.Diagnostics)
IMTC 2008 | Session XXXX
imtc.firstport.ie
ASP.Net HTTPHandlers and HTTPModules


HTTPHandler

Similar to ISAPI Extensions

Can be called via url

Act as target for incoming requests
HttpModules

Plug into the ASP.Net request processing pipeline

Registered for certain events

As the event occurs ASP.Net invokes the module
so it can handle the request
IMTC 2008 | Session XXXX
imtc.firstport.ie
Your Logo
Goes Here
DEMO – Extensibility
IMTC 2008 | Session XXXX
imtc.firstport.ie
Troubleshooting and Diagnostics

Real Time State Information Available

Current Processes Running

Application Pools Process ID

Currently executing requests

AppDomains Loaded

Real-time starting and stopping of sites

Failed Request Tracing

Extensive Custom Errors
IMTC 2008 | Session XXXX
imtc.firstport.ie
Failed Request Tracing

Traces all requests through Pipeline

Automatically Enabled on IIS 7

Easily identify failing, stuck requests

Identifies time taken in each module, helping
analyzing long running requests
IMTC 2008 | Session XXXX
imtc.firstport.ie
Custom Errors

Much more detailed

Language specific (Accept-Encoding)

Time

Image Copyright Handler
Build Module and Integrate with IIS7 Admin
URLBuild

Current Module

Response Status, Sub-status

More Information – Detailed steps to fix problem
where available
IMTC 2008 | Session XXXX
imtc.firstport.ie
Your Logo
Goes Here
DEMO – Troubleshooting
IMTC 2008 | Session XXXX
imtc.firstport.ie
Unified Platform for Web Services and
WCF



Host WCF Services using Windows
Activation Service (WAS)
Supports Non-HTTP Protocols such as

Named Pipes

TCP

MSMQ
Provides features for idle-time management,
health monitoring, process recycling
IMTC 2008 | Session XXXX
imtc.firstport.ie
WAS Processing of Service Requests
Worker Process (w3wp.exe)
App Domain
TcpProcess
ProtocolHandler
HttpHandler
HttpModule
Windows
Activation
Service
(WAS)
IMTC 2008 | Session XXXX
NamedPipeProcess
ProtocolHandler
MSMQProcess
ProtocolHandler
W3svc
HTTP
Listener
Adapter
Named
Pipe
Inpass
Listener
Adapter
TCP
Itcpas
Listener
Adapter
MSMQ
Imsmqas
Listener
Adapter
Http.sys
Net.pipe
Net.tcp
net.msmq
imtc.firstport.ie
Conclusions

Major Release – Most Significant since 1.0

Fully Customisable – Managed and Native

New Pipeline

ASP.Net Fully Integrated


First time desktop and server versions
aligned
Go and have a look 
IMTC 2008 | Session XXXX
imtc.firstport.ie
Resources
Windows Server 2008 – Eval - http://msdn2.microsoft.com/enus/windowsserver/cc137233.aspx

IIS Resources – http://www.iis-resources.com

Help with F5 Debugging on Vista http://mvolo.com/blogs/serverside/archive/2006/12/28/Fix-problems-withVisual-Studio-F5-debugging-of-ASP.Net-applications-on-IIS7-Vista.aspx

MSDN Magazine – http://msdn.microsoft.com/msdnmag


Aggregated IIS RSS Feed - http://blogs.iis.net/rawmainfeed.aspx
IMTC 2008 | Session XXXX
imtc.firstport.ie
Your Logo
Goes Here
Q&A
Now
After this session
Via my blog –
http://www.andrewwestgarth.co.uk/Blog
[email protected]
DDD Ireland –
http://www.dddireland.com
Saturday 3rd May 2008
Galway-Mayo Institute of Technology
Dublin Road
Galway
Ireland
Your Logo
Goes Here
Irish Microsoft Technology
Conference 2008
Next Sessions
Track 1: Using the Web Client Software Factory –
Gary Short
Track 2: XNA Ireland: The Challenge – Phil
Bourke
Track 3: Using XML Web Services to manage
external SQL Data Interfaces – Alan Crowley
Track 4: PowerShell and WMI – Thomas Lee