iis7 integrated pipeline mode vs classic mode v2 4[1]

Download IIS7 Integrated Pipeline Mode vs Classic Mode V2 4[1]

Post on 16-Jul-2015

395 views

Category:

Documents

2 download

Embed Size (px)

TRANSCRIPT

IIS7 Integrated Pipeline Mode vs. Classic Pipeline Mode

Prepared by Microsoft Consulting Services, West Region Monday, 23 January 2012 Version .2.0

Prepared by Mannan Mohammed, Sr. Architect Gang Pan, AcutePath, Inc. Contributors Mike Volodarsky, Program Manager Stefan Schachow, Senior Program Manager

This file does not collect any personal information. The information contained in this document represents the current view of Microsoft Corporation on the issues discussed as of the date of publication. 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 presented after the date of publication. This White Paper is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS DOCUMENT. Complying with all applicable copyright laws is the responsibility of the user. Without limiting the rights under copyright, no part of this document may be reproduced, stored in or introduced into a retrieval system, or transmitted in any form or by any means (electronic, mechanical, photocopying, recording, or otherwise), or for any purpose, without the express written permission of Microsoft Corporation. Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter in this document. Except as expressly provided in any written license agreement from Microsoft, the furnishing of this document does not give you any license to these patents, trademarks, copyrights, or other intellectual property. Unless otherwise noted, the example companies, organizations, products, domain names, e-mail addresses, logos, people, places and events depicted herein are fictitious, and no association with any real company, organization, product, domain name, email address, logo, person, place or event is intended or should be inferred. 2007 Microsoft Corporation. All rights reserved. Microsoft, Outlook, SharePoint, Windows, and Windows Server are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries. The names of actual companies and products mentioned herein may be the trademarks of their respective owners.

Table of Contents1 Introduction.......................................................................................1 2 IIS7 Request Processing....................................................................2 IIS7 Application Pools..........................................................................1 2.1 Integrated Mode.................................................................................1 2.2 Classic Mode......................................................................................1 3 Key Differences Between Integrated Mode and Classic Mode.............2 3.1 ASP.NET Support................................................................................3 3.2 Configuration Settings.........................................................................3 3.3 Authentication, Authorization and Impersonation.....................................5 3.3.1 Different windows identity in Forms authentication..........................5 3.3.2 Default Authentication_OnAuthenticate event does not raise in Integrated mode..................................................................................6 3.3.3 Passport Network credentials authentication is not supported in Windows Vista.....................................................................................6 3.3.4 PassportAuthentication module is not part of the Integrated pipeline. .6 3.3.5 HttpRequest.LogonUserIdentity throws an exception when accessed before PostAuthenticateRequest.............................................................7 3.3.6 In Integrated mode, ASP.NET modules will receive the first unauthenticated request to IIS when Anonymous authentication is disabled. 7 3.3.7 ASP.NET cannot impersonate the client identity until PostAuthenticateRequest.......................................................................7 3.3.8 Using Windows and Forms authentication together in Integrated mode is not supported...................................................................................7 3.3.9 Migration Issues and Workarounds................................................8 3.4 Requst Limits and URL Processing........................................................10 3.4.1 In Integrated mode, the ASP.NET request time-out is applied multiple times during the request, allowing the request to execute longer..............10

3.4.2 Large, valid forms auth tickets (length > 2048 bytes) present in the query string are rejected by IIS 7.0......................................................10 3.4.3 In Integrated mode Request.RawUrl contains the new query string after RewritePath is called....................................................................10 3.4.4 Migration Issues and Workarounds...............................................10 3.5 Response Header Processing...............................................................11 3.5.1 In Integrated mode, IIS always rejects new lines in response headers (even if ASP.NET enableHeaderChecking is set to false)...........................12 3.5.2 Response headers are removed in Integrated mode after calling ClearHeader in a custom IHttpModule....................................................12 3.5.3 Content-Type header is not generated when charset and content type are set to empty string........................................................................12 3.5.4 Migration Issues and Workarounds...............................................12 3.6 Application and Module Processing.......................................................13 3.6.1 In Integrated mode, Application_OnError is not called for exceptions that occur in HttpApplication::Init.........................................................13 3.6.2 In Integrated mode, ASP.NET applications must subscribe to pipeline events during a module's Init call..........................................................13 3.6.3 If a configuration file error is encountered when using Integrated mode, IIS, not ASP.NET, generates the error message.............................14 3.6.4 In Integrated mode, threading and queuing settings in are ignored. .14 3.6.5 The ordering of modules is reversed for PreSendRequestHeaders and PreSendRequestContent when using Integrated mode.............................14 3.6.6 PreSendRequestHeaders and PreSendRequestContent events will raise together for each module.....................................................................14 3.6.7 In Integrated mode, both synchronous and asynchronous events raise for each module before the next module executes...................................14 3.6.8 HttpContext, HttpRequest and HttpResponse are not available in the start event, so those objects cant be used in Application_OnStart(). ........15 3.6.9 Integrated mode applications may write to a response in EndRequest after an exception has been formatted and written to the response...........15 3.6.10 Migration Issues and Workarounds.............................................15 3.7 Others.............................................................................................17

3.7.1 Server.ClearError in EndRequest does not clear exception message in Integrated mode.................................................................................17 3.7.2 In Integrated mode, ASP.NET no longer suppresses the content type when the response is empty.................................................................17 3.7.3 Trace settings are not transferred to Server.Transfer target page.....17 3.7.4 New Or Changed API Members for Integrated Mode.......................17 3.7.5 Migration Issues and Workarounds...............................................18 4 Summary..........................................................................................21 5 References.......................................................................................22 6 Appendix..........................................................................................23

1 IntroductionInternet Information Services 7.0 (IIS7) introduces many architectural enhancements. One such significant enhancements is made to the request processing pipeline, which is the focus of this paper. IIS7 operates in two modes: integrated mode and classic mode. Integrated mode is the default configuration for IIS7 application pools; classic mode (sometime also referred as ISAPI mode) is identical to IIS6, which is for backward compatibility. This document will discuss these two modes from both administrative and development perspectives, such as their differences, impacts on existing web application, advantages and migration options. Lets first look at the new IIS7 architecture:Integrated Mode HTTP Request HTTP Response Basic Forms Authentiction Anonymous Windows Authentiction HTTP Request HTTP Response Basic Forms Anonymous Windows Classic Mode

...

ASPX (ASPNET) Static File Trace ISAPI

...

ASPX (ASPNET ) Static File Trace ISAPI

Aspnet_isapi.dll Authentication Forms Windows ... ASPX Map Handler Trace ...

ExecuteHandler

ExecuteHandler

...

...

Compression Send Response Log Send Response

Compression Log

...

Figure 1: IIS7 Architecture Overview

As depicted in the Figure 1, IIS7 consists of key components that perform important functions for the application and web server roles in Windows Server 2008. Each component has different responsibilities, such as listening for requests made to the server, managing processes, and reading configuration files. These components