250 likes | 430 Views
IIS 7 for Developers. Chris J.T. Auld Director – Strategy and Innovation Intergen MSDN Regional Director. IIS7: Total Platform Extensibility. Build and deploy custom server components Leverage powerful modular server architecture New native (C++) server APIs
E N D
IIS 7 for Developers Chris J.T. Auld Director – Strategy and Innovation Intergen MSDN Regional Director
IIS7: Total Platform Extensibility • Build and deploy custom server components • Leverage powerful modular server architecture • New native (C++) server APIs • Powerful and convenient managed (.NET) server features • Extend the configuration and administration tools • Leverage the new ‘remote management’ capabilities • Create new schematized configuration sections • Plug into IIS Manager as a first-class citizen with custom UI
IIS6 Architecture • Monolithic server implementation • Limited customization • Fixed functionality • Limited ISAPI Filter extensibility
IIS7 Architecture • Componentized server • Pluggable modular functionality • Small generic request pipeline • Enables • Lightweight servers • Custom / specialized servers
IIS6 + ASP.NET • ISAPI Extension • Only processes ASP.NET requests • Runtime limitations • Feature duplication
IIS7 ASP.NET Integration • Classic Mode • For compatibility • Integrated Mode • Can process all requests • Enhanced functionality • Higher fidelity notifications • Developer extensible
.NET Extensibility • Existing ASP.NET API • IHttpModule and IHttpHandler types • Expanded ASP.NET APIs • New HttpApplication Events • MapRequestHandler, LogRequest, PostLogRequest • HttpRequest.Headers • HttpResponse.Headers • HttpResponse.DisableKernelCache • HttpRequest.ServerVariables
Handlers vs Modules • Modules provide services to all requests • Basic Authentication module • Compression module (etc) • Handlers provide services to specific requests • ISAPI handler (.dll) • Static handler (.htm, .jpg, .gif, etc) • IIS 7 pipeline allows native and managed modules and handlers • “Integrated” Application Pool mode • use the managed modules and handlers • “Classic” Application Pool mode • IIS 6 style invocation of .NET
A Real Kiwi Example demo The ActionThis Runtime Page Optimizer http://www.actionthis.com/rpo/
Contoso.com root Configuration System .NET + IIS7 Contoso.com \ Orders .NET Framework Machine.config Root web.config Site web.config <system.web>.NET settings .. ASP.net global settings NET global settings .. .. <system.webServer>IIS7 Delegated settings .. IIS 7 Applicationhost.config Global settings and location tags
Extending Configuration • IIS settings now live in ApplicationHost.config • Can also be specified in web.config if delegation is allowed • All settings are schematized in XML • ‘Schema’ files live in %windir%\system32\inetsrv\config\schema • Shared configuration allows multiple servers to use the same centralized configuration • Extending configuration • Static Configuration • Drop a .xml file into the schema directory • Add a section to applicationHost.config
Dynamic Configuration • Allows you to add dynamic properties and add behavior to configuration • AHADMIN - Application Host Administration Interface • Implemented in %Windows%\System32\Inetsrv\nativerd.dll • Implements IIS native configuration stack • Exposes a COM API • Exposes three interfaces for Dynamic Extensibility • IAppHostPropertyExtension • IAppHostMethodExtension • IAppHostElementExtension
Benefits Tools for every need • AppCmd.exe • Command line to query and modify configuration • IIS Manager • User Interface for end users • WMI • New WMI provider to query and edit configuration • Scripting • AHADMIN is a new COM interface for managing configuration system • Managed Code • Microsoft.Web.Administration provides a simple managed API to edit configuration
IIS Manager • Completely re-written using .NET Windows Forms and managed code • IIS Manager is now easily extensible • Add new feature pages • Extend tasks for sites/applications • More… • Extensibility Framework • Microsoft.Web.Management.dll • Transparent remoting over HTTPS
IIS Manager Architecture IIS Manager Client Connection Connection Manager Module Service Proxy Module Service Module UI Web Management Service (WMSvc) Standalone Web Server http://server:8172 Runtime State Provider Data Content and Configuration Module UI Framework IIS 7.0 ApplicationAppDomain Provider
Extending IIS Manager • Develop service-side functionality • ModuleProvider • ModuleService • Develop client-side functionality • Module • ModuleServiceProxy • ModulePage
Summary • IIS7 provides end-to-end extensibility for the managed code developer • Take advantage of the IIS7 managed pipeline • Extend configuration • Build new features into the management tool
Important Info + Q&A • Chris Auld • http://www.syringe.net.nz • Chris.Auld@intergen.co.nz • IIS Community Site • http://www.iis.net • ActionThis Runtime Page Optimizer • http://www.actionthis.com/rpo/
Reminders • Subscribe to our free, online newsletters to stay up to date with Microsoft news, information & events • www.microsoft.co.nz/subscribe • Don’t forget to fill in your Evaluation form! • Hand in at end of day for complimentary software • TechEd 2008: 1-3 September, SkyCity • Mark the dates. Registration opening soon.