for developers

Download for Developers

Post on 23-Feb-2016

26 views

Category:

Documents

0 download

Embed Size (px)

DESCRIPTION

for Developers. Martin Parry Developer and Platform Group Microsoft martin.parry@microsoft.com http://martinparry.com. Agenda. Top 7 Ways To Light Up Your Apps on Windows Server 2008 Part 1 emphasis on IIS7, PowerShell Part 2 emphasis on WER, Restart and Recovery APIs, TxF. - PowerPoint PPT Presentation

TRANSCRIPT

Windows Server 2008 for Devs

for DevelopersMartin ParryDeveloper and Platform GroupMicrosoftmartin.parry@microsoft.comhttp://martinparry.com

AgendaTop 7 Ways To Light Up Your Apps on Windows Server 2008Part 1 emphasis onIIS7, PowerShellPart 2 emphasis onWER, Restart and Recovery APIs, TxFThe Top 7 Ways Part 1Build More Flexible Web ApplicationsDesign Highly-Manageable ApplicationsDevelop Federation-Aware ApplicationsBuild Connected SystemsBuild For ScalabilityVirtualizeDevelop More Reliable Applications31. Build More Flexible Web AppsIIS 7.0 IntroductionClient version shipped with Windows VistaLimited throughputServer version will ship with WS2008Currently available in RC formMore features than clientIIS 6.0 Architecture

IIS 7.0 Architecture

Windows Process Activation ServiceManages configurationWhat used to be the metabaseResponsible for starting worker processes...w3wp.exe...and routing incoming requests to the appropriate worker processAlso hosts the new listener adapter interfaceYou can build your own listeners for WASIIS 6.0 Request Pipeline

IIS 6.0 Request PipelineIIS pipeline extensible using ISAPINative codeCan apply to all requestsASP.NET pipeline extensible using IHttpModuleManaged codeCan only apply to requests routed via ASP.NETCertain pipeline elements are always thereIIS authenticationLogging

IIS 7.0 Request Pipeline

IIS 7.0 Request PipelineLinear sequence of modulesAny module can be enabled/disabledIncluding built-in onesModules can be managed or native codeAny type of module applies to any requestIIS7 Modules13IIS 6.0 ConfigurationIIS 6.0 (and earlier) use the metabaseStores all configuration informationOriginally in binary form, then in XMLHard to allow management of separate apps by different groups of people

IIS 7.0 Configurationmachine.configroot web.configweb.configweb.configweb.configapplicationHost.configIIS7 Configuration16Building Native ModulesExport a RegisterModule function from DLLDefine one or more other functionsTo process request or responseInside RegisterModule...Hook up your other functions(s) at specific points in the pipelineE.g. Begin, AuthN, AuthZ, ExecuteHandler, EndBuilding Managed ModulesImplement IHttpModuleImplement Init functionAttach event handlers for specific points in the pipelineE.g. Begin, AuthN, AuthZ, ExecuteHandler, EndSame as existing ASP.NET HttpModules

IIS7 Managed Module19IIS7 Diagnostics - RSCARuntime Status and Control APIShows currently executing: -Application PoolsRequestsExposed viaIIS admin toolProgrammatically via WMI and Managed OM

IIS7 Diagnostics Failed RequestsIIS7 allows you to log trace information just for requests that failFor some definition of failureBuffers all trace outputOnly flushes to disk if the request failsLog output is XML, with a stylesheetBreaks down processing by moduleIncludes timing details for each moduleIIS7 Failed Request TracingEnable FREB at the Web Site levelConfigure FREB rules at the application levelEach rule: -Specifies the type of web content it applies toCan specify a specific failure codeCan specify a duration in secondsCan specify a trace event severityIIS7 Failed Request Tracing2. Design Highly-Manageable AppsManagement in Windows Server 2008MMC v3.0Managed framework for building snap-insMicrosoft.ManagementConsole namespaceShips with .NET Framework v3.0Already seen it in use IIS Admin Console

Windows PowerShellWindows PowerShellIts a command-line interface!ScriptableCommands may be composedNot based on text, based on .NET objectsAvailable for...Windows XPWindows Server 2003Windows VistaShips inside...Windows Server 2008Windows PowerShell and ScriptingPowerShell and DevelopersDevelopers can create new commands...and can create PowerShell drivesExcellent way to provide admin experience for your applications.Exchange 2007 and SQL Server 2008, for examplePowerShell Cmdlets and Providers3. Develop Federation-Aware AppsDeveloping Federated Identity AppsWith AD FSActive Directory Federation Services

Why?Enables cross-domain, cross-platform access to your Web applicationsProvides Web SSO experiencePromotes a claims-based programming modelAchieve reach for your applicationThink outside of the firewall

1/23/2008 9:58 AM 2005 Microsoft Corporation. All rights reserved.This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.31

B2B Federation ScenarioFederation Trusthttpshttpshttps

1/23/2008 9:58 AM 2005 Microsoft Corporation. All rights reserved.This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.32Application Authorization Using ClaimsClaimsStatements made by an authority about a userUsed for authorization purposes

Three types of ADFS claimsIdentityEmailUser Principal Name (UPN)Common NameGroupCustomIdentity

UPN:eric@adatum.comGroup

PurchaserAdministratorAdatumCustom

DisplayName:Eric Parkinson

Position:Purchasing Staff1/23/2008 9:58 AM 2005 Microsoft Corporation. All rights reserved.This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.33Coding a Federation-Aware appSystem.Web.Security.SingleSignOnSystem.Web.Security.SingleSignOn.AuthorizationIn code: -SsoId = User.Identity as SingleSignOnIdentitySsoId.IsAuthenticated have we a good security token?SsoId.SecurityPropertyCollection each item could be...Group claim, UPN claim, custom claimApplication can get any/all claim details4. Build Connected Systems

Interopwith otherplatformsASMXAttribute- BasedProgrammingEnterprise ServicesWS-*ProtocolSupportWSEMessage-OrientedProgrammingSystem.MessagingExtensibilityLocation transparency.NET Remoting

Windows Communication Foundation1/23/2008 9:58 AM36

Sub-queuesPoison Message HandlingApp-Specific Dead Letter QueuesTransactionalRemote ReceiveMSMQ 4.0Sub-queuesNever created explicitlyAccessed via DIRECT FormatName...DIRECT=OS:server\private$\myqueue;mysubqCreated at time of first OpenCan receive in the normal fashionCan only insert with MQMoveMessageNo managed code equivalent Poison Message HandlingWCF binding configuration...