Home
Wiley Professional IIS 7 and ASP.NET Integrated Programming
Contents
1. line tool Option Description iu updatel update2 Run the tool with this option to install the specified updates Notice that the update list contains a semicolon separated list of update names discussed in the previous sections uu updatel update2 Run the tool with this option to uninstall the specified updates Notice that the update list contains a semicolon separated list of update names discussed in the previous sections n unattend xml Run the tool with this option to install or uninstall the updates speci fied in the specified unattend xml file I cover this file in the follow ing section When you use the pkgmgr exe command line tool to install specified updates you must also explicitly specify and install the updates that your specified updates depend on For example if you decide to install the IIS CommonHttpFeatures update you must also install its parent update that is IIS WebServer To install the IIS WebServer update you must also install its parent update IIS WebServerRole and the update that it depends on WAS ProcessModel see the update dependencies table To install the WAS ProcessModel update you must also install its parent update WAS WindowsActivationService update start w iu IIS WebServerRole WAS WindowsActivationService WAS ProcessModel TIS WebServer IIS CommonHttpFeatures Notice that if you don t specify the start w option the command line tool will return immediately and proc
2. Figure 1 13 To install the following roles role services or features dick Install Web Server 115 2 Web Server 115 Web Server Common HTTP Features Static Content A Default Document SS Directory Browsing Installation Results HTTP Errors Application Development ASP NET NET Extensibilty ISAPI Extensions ISAPI Filters Health and Diagnostics HTTP Logging Request Monitor Secunty Request Filtering Performance Static Content Compression Management Tools TIS Management Console Print e mail or save this information Po ee em Figure 1 14 52539c01 qxd WroxPro 9 17 07 6 51 PM Page 19 F Chapter 1 IIS 7 and ASPNET Integrated Architecture Click the Install button in Figure 1 14 to have Server Manager install the specified updates This will take you to the progress page where you have to wait for a while for the updates to be installed When the installation completes the Add Roles Wizard automatically takes you to the page shown in Figure 1 15 Add Roles Wizard Before You Begin Select Server Roles Web Server IIS Role Services Installation Progress Figure 1 15 Confirm Installation Selections Ws Installation Results The following roles role services or features were installed successfully 2 Web Server IIS 17 Installation succeeded The following role services were installed Web Server Common HTTP Features Static Content RR j
3. One of the great new features of the IIS 7 and ASP NET integrated configuration system is its declarative extensibility through a new integrated declarative schema extension markup language Thanks to this integrated markup language you can extend this integrated configuration system to add support for new configuration sections without writing a single line of imperative code such as C or VB This is a departure from the imperative extensibility model of the ASP NET configuration system which requires developers to write a fair amount of imperative code to extend the system IIS 7 and ASP NET Integrated Administration Having two separate configuration systems for ASP NET and IIS in IIS 6 0 also means having two sepa rate administration tools GUIs and APIs to administer and to manage them Having a single integrated configuration system made it possible for the IIS 7 team to introduce brand new administration or man agement tools GUIs and APIs that make the task of server site and application administration a whole lot easier This allows you to use the same integrated management tools GUIs and APIs to configure ASP NET and IIS Two very important components of the IIS 7 and ASP NET integrated administration are the integrated graphical management system and the integrated imperative management system This book covers both of these systems and their extensibility models in detail You will learn how to extend these two systems to add g
4. After you re done with toggling on the desired updates click the Next button in Figure 1 13 to move on to the confirmation page shown in Figure 1 14 which lists all the selected updates and their dependent updates At this point these updates have not been installed yet 52539c01 qxd WroxPro 9 17 07 6 51 PM Page 17 Chapter 1 IIS 7 and ASPNET Integrated Architecture Add Roles Wizard x or Select Server Roles Before You Begin Select one or more roles to install on this server Roles Description 5 Confirm Installation Selections Active Directory Certificate Services Goes lath to pra instalation Progress praia o aoe aia Installation Results Add Roles Wizard You cannot install Web Server IS unless the following features are also installed Windows Process Activation Service Process Model Configuration APIs Add Required Features Cancel ired Why are these features required Next gt ma cama Figure 1 11 Before You Begin Select the role services to install for Web Server IIS Select Server Roles Role services Description La Web Server provides support for HTML Web Server IIS Web sites and optional support for Common HTTP Features Y Static Content Y Default Document Y Directory Browsing Z HTTP Errors C HTP Redirection C Application Development ASP NET NET Extensibilty ASP CGI ISAPI Extensions O ISAPI Fiters CO Server Side I
5. Q Right click the Roles node in the Server Manager panel and select Add Roles Q Click the Action menu and select Add Roles The first page of the Add Roles Wizard provides you with some preliminary instruction Read the instructions and make sure your account meets the specified requirements as shown in Figure 1 9 Add Roles Wizard xj pr Before You Begin Before You Begin This wizard helps you install roles on this server You determine which roles to install based on the tasks you z ae want this server to perform such as sharing documents or hosting a Web site Web Server IIS Before you continue verify that Role Services The Administrator account has a strong password 8 e Network settings such as static IP addresses are configured Confirm Installation Selections e The latest security updates from Windows Update are instaled Installation Progress If you have to complete any of the preceding steps cancel the wizard complete the steps and then run the Installation Results wizard again To continue dick Next T Do not show this page again Figure 1 9 15 52539c01 qxd WroxPro 9 17 07 6 51 PM Page 16 F Chapter 1 IIS 7 and ASPNET Integrated Architecture 16 Click the Next button to go to the page shown in Figure 1 10 Add Roles Wizard xj PE Select Server Roles Before You Begin Select one or more roles to install on this server Select Server Roles Roles Description Confirm Installation Selections A
6. authenticate client certificates with Active Directory accounts IS IISCertificateMappingAuthentication Use this module to enable your Web server to map client certificates 1 to 1 or many to 1 to a Windows security identity IIS URLAuthorization Use this module to enable your Web server to per form URL authorization IIS RequestFiltering Use this module to enable your Web server to deny access based on specified configured rules IIS IPSecurity Use this module to enable your Web server to deny access based on domain name or IP address IIS Performance The following table describes the performance feature modules Performance Feature Module Description IIS HttpCompressionStatic Use this module to enable your Web server to compress static con tent before sending it to the client to improve the performance IIS HttpCompressionDynamic Use this module to enable your Web server to compress dynamic content before sending it to the client to improve the performance 52539c01 gxd WroxPro 9 17 07 6 51 PM Page 6 F Chapter 1 IIS 7 and ASPNET Integrated Architecture IIS WebServerManagementTools Figure 1 3 presents the Web server management feature modules d 1IS WebServerManagementTools D 1IS ManagementsScriptingTools D 4 11S 1IS6ManagementCompatibility C llSMetaase 11S WMICompatibility IIS LegacySnapIn Figure 1 3 The followi
7. a new set of convenient object oriented APIs that make writing new fea ture modules a piece of cake These APIs come in two different flavors managed and native The native APT is a convenient C API that you can use to develop and plug native modules into the core Web server The managed API on the other hand allows you to take full advantage of the NET Framework and its rich environment This allows both ASP NET developers and IIS 7 administrators to use conven ient ASP NET APIs to extend the core Web server IIS 7 and ASP NET Integrated Request Processing Pipeline Take a look at the request processing model of IIS 6 0 for processing requests for ASP NET content as shown in Figure 1 5 Notice that this figure contains two different request processing pipelines IIS 6 0 and ASP NET Each request processing pipeline is a pipeline of components that are invoked one after another to perform their specific request processing tasks For example both pipelines contain an authentication component which is called to authenticate the request J Request Request 1156 0 Request Processing Pipeline ASP NET Request Processing Pipeline Preprocessing Preprocessing Authentication Authentication U Request l Request Handler Mapper J 4 Handler Mapper Postprocessing Postprocessing Response Figure 1 5 52539c01 qxd WroxPro 9 17 07 6 51 PM Pa
8. begins after the IIS pipeline maps the request to the aspnet_isapi extension module the ASP NET pipeline has no impact on the IIS pipeline steps prior to handler mapping Q Because the rest of the IIS pipeline steps don t occur until the ASP NET pipeline finishes the ASP NET pipeline has no impact on the IIS pipeline steps either Q Because the ASP NET pipeline kicks in only when the IIS pipeline maps the request to the aspnet_isapi extension module and because this mapping is done only for requests to ASP NET content the ASP NET pipeline components cannot be applied to requests to non ASP NET content such as jpg js asp CGI and the like For example you cannot use the ASP NET authentication and authorization modules to protect the non ASP NET con tents of your application IIS 7 has changed all that by removing the aspnet_isapi extension module and combining the ASP NET and IIS pipelines into a single integrated request processing pipeline as shown in Figure 1 6 This resolves all the previously mentioned problems as follows Q The integrated pipeline does not contain any duplicate components For example the request is authenticated once Q The ASP NET modules are now first class citizens in the integrated pipeline They can come before replace or come after any native IIS 7 modules This allows ASP NET to intervene at any stage of the request processing pipeline Q Because the integrated pipeline treats managed modules like
9. of the Web server because all IIS configuration settings are centralized This also takes away from the ASP NET developers the opportunity to tailor the IIS configuration settings toward their own applications Having two sepa rate configuration systems for IIS and ASP NET configuration settings also means that you have to learn two separate APIs to programmatically access and edit these configuration settings IIS 7 has changed all that Having a single integrated pipeline made it possible for the IIS 7 team to intro duce a single integrated configuration system for both IIS and ASP NET settings Because this integrated configuration system is an extension of the ASP NET configuration system the existing ASP NET config uration files can easily merge into the new integrated configuration system with a little or no changes 52539c01 gxd WroxPro 9 17 07 6 51 PM Page 11 F Chapter 1 IIS 7 and ASPNET Integrated Architecture This integrated configuration system provides a lot of benefits to system administrators and developers alike For one thing both IIS and ASP NET configuration settings are stored in storage media with the same schema This is great news for ASP NET developers because the new integrated schema is an extension of the ASP NET configuration schema Another obvious benefit of the integrated configura tion system is that you can use the same set of APIs to programmatically access and set both IIS 7 and ASP NET configuration settings
10. 52539c01 gxd WroxPro 9 17 07 6 51 PM Page 1 F IIS 7 and ASP NET Integrated Architecture Internet Information Services 7 0 IIS 7 is the latest version of Microsoft Web server IIS 7 has gone through significant architectural changes since the last version The most notable change for ASP NET developers is the deep integration of the IIS 7 and ASP NET framework This provides both ASP NET developers and IIS 7 administrators with an integrated programming environment that allows them to implement features and functionalities that were not possible before The main goal of this chapter is twofold First it covers the IIS 7 package updates and their constituent fea ture modules discusses five different IIS 7 setup options and shows you how to use each option to custom build your own Web server from these package updates Second it provides you with an overview of the IIS 7 and ASP NET integrated architecture and its constituent systems setting the stage for the next chapters where you ll dive into the details of this integrated architecture and programming framework Modular Architecture of IIS 7 The main priority of the Microsoft IIS team for IIS 6 0 was to improve its security performance and reliability For that reason modularity and extensibility didn t make it to the list of top priori ties for IIS 6 0 That said IIS 6 0 introduced a very important notion selectively disabling IIS 7 fea tures such as ISAPI extensions and CGI compon
11. S WebServer D LC 1IS WebServerManagementTools L IIS FTPPublishingService gt Figure 1 1 52539c01 gxd WroxPro 9 17 07 6 51 PM Page 3 F Chapter 1 IIS 7 and ASPNET Integrated Architecture IIS WebServer The IIS WebServer update contains five updates as shown in Figure 1 2 As you can see this update con tains the feature modules that make up the core functionality of a Web server C 1IS WebServer 4 11S CommonHTTPFeatures D LC 11S ApplicationDevelopment D me 11S Security LC 1IS Performance D Figure 1 2 IIS CommonHttpFeatures The IIS CommonHttpFeatures update contains the feature modules or components described in the fol lowing table Feature Module Description IS StaticContent Use this module to enable your Web server to service requests for static content Web site resources with file extensions such as htm1 htm jpg and the like that can be serviced without server side processing are known as static content TIS DefaultDocument This module allows you to specify a Web resource that will be used as the default resource when the request URL does not contain the name of the requested resource IS DirectoryBrowsing Use this module to enable your Web server to display the contents of a specified directory to end users when they directly access the directory and no default document exists in the directory IIS HttpErrors Use this module to enabl
12. ctive Directory Certificate Services beeen as Hovas a ser Installation Progress Active Directory Domain Services SS SS SSS Active Directory Federation Services Active Directory Lightweight Directory Services Active Directory Rights Management Services _ Application Server DHCP Server ONS Server Fax Server Fie Services Network Policy and Access Services Print Services Terminal Services _ UDDI Services _ Web Server IIS L Windows Deployment Services C Windows SharePoint Services Installation Results oono000 DOOOOOCI Figure 1 10 Check the Web Server IIS item shown in Figure 1 10 It should show you the popup shown in Figure 1 11 informing you that you need to install the Windows Process Activation Service Click the Add Required Features button on this popup to install the Windows Process Activation Service Now click Next to go the next page which provides some preliminary information Click Next again to go to the page shown in Figure 1 12 Notice that some package updates are already selected These updates form the default installation of the Web server Note that when you turn on an update that depends on other updates the Server Manager tool pops up a message showing the updates on which the selected update depends and informing you that you need to install the dependent updates as well For example when you check the ASP NET option the Server Manager pops up the message shown in Figure 1 13
13. dependencies The following table pres ents the update interdependencies Update Depends On TIS WebServer WAS ProcessModel TIS ASP TIS ISAPIExtensions IIS RequestFiltering IIS ASPNET TIS DefaultDocument IIS NetFxExtensibility WAS NetFxEnvironment TIS ISAPIExtensions TIS ISAPIFilter IIS RequestFiltering IIS NetFxExtensibility WAS NetFxEnvironment IIS RequestFiltering IIS ManagementService TIS WebServer IIS ManagementConsole WAS NetFxEnvironment WAS ConfigurationAPI IIS ManagementConsole WAS ConfigurationAPI IIS ManagementScripting Tools WAS ConfigurationAPI IIS LegacyScripts IIS Metabase IIS WMICompatibility Every update also depends on its parent update For example to install IIS WebServer you must also install its parent update IIS WebServerRole 12 52539c01 qxd WroxPro 9 17 07 6 51 PM Page 13 F Chapter 1 IIS 7 and ASPNET Integrated Architecture Windows Features Dialog Follow these steps to use the Windows Features dialog to set up and custom build your Web server on Windows Vista 1 Launch the Control Panel 2 Click the Programs option if Control Panel is displayed in its default view or the Programs and Features option if Control Panel is displayed in Classic View 3 Click Turn on or off Windows features to launch the Windows Features dialog shown in Figure 1 7 If you haven t logged in as the built in Administrator account Vista will launch the User Account Contr
14. e Directory Browsing HTTP Errors Application Development ASP NET NET Extensibility ISAPI Extensions ISAPI Filters Health and Diagnostics HTTP Logging Request Monitor Security Request Filtering Performance Static Content Compression Mananement Tools z Print e mail or save the installation report If you click the Close button in Figure 1 15 you ll be back to the Server Manager shown in Figure 1 16 Note that the Roles nodes on the left panel and the middle panel now contain a role named Web Server IIS _ Server Manager ioj xi File Action View Help m B da E Roles m 83 Storage amp Web Server IIS El Features a Diagnostics fA Configuration Server Manager LH 8DISZHVVMQQN Get an overview of this server change system properties and install or remove server roles and features A Roles 1 of 17installed Go to Manage Roles ie Add Roles B Remove Roles Y Features Summary Features Summary Help gt j LastRefresh 6 7 2007 4 46 05 PM Configure refresh Web Server IIS Figure 1 16 19 52539c01 qxd WroxPro 9 17 07 6 51 PM Page 20 F Chapter 1 IIS 7 and ASPNET Integrated Architecture Command Line Setup Option Windows Vista and Windows Server 2008 come with a new command line tool named pkgmgr exe that you can use to custom install IIS 7 The following table describes the available options on this command
15. e your Web server to support sending custom error messages to end users IIS HttpRedirect Use this module to enable your Web server to support request redirects 52539c01 qxd WroxPro 9 17 07 6 51 PM Page 4 F Chapter 1 IIS 7 and ASPNET Integrated Architecture IIS ApplicationDevelopment The IIS ApplicationDevelopment update contains the feature modules that support different application types as described in the following table Feature Module Description IIS ASPNET Use this module to enable your Web server to host ASP NET applications IIS NetFxExtensibility Use this module to enable your Web server to host managed modules TIS ASP Use this module to enable your Web server to host ASP applications TIS CGI Use this module to enable your Web server to support CGI executables IIS ISAPIExtensions Use this module to enable your Web server to use ISAPI extension mod ules to process requests IIS ISAPIFilter Use this module to enable your Web server to use ISAPI filter to cus tomize the server behavior TIS ServerSidelncludes Use this module to enable your Web server to support stm shtm and shtml include files IIS HealthAndDiagnostics The IIS HealthAndDiagnostics package update contains the feature modules described in the following table Feature Module Description IIS HttpLogging Use this module to enable your Web server to log Web site activities IIS LoggingLibraries Use this module to i
16. ents One of the main problems with the earlier versions of IIS was that all features of IIS had to be installed and enabled There was no way to dis able features that your application scenario did not need IIS 6 0 enables only static file serving by default on a clean install of the Web server In other words dynamic features such as ISAPI extensions and CGI components are disabled by default unless the administrator explicitly enables them Such customization of the Web server allows you to decrease the attack surface of your Web server by giving attackers fewer opportunities for attacks 52539c01 gxd WroxPro 9 17 07 6 51 PM Page 2 F Chapter 1 IIS 7 and ASPNET Integrated Architecture Disabling unwanted features was the first step toward the customizability of IIS However this step didn t go far enough because IIS 6 0 still installs everything which introduces the following problems A Disabled features consume server resources such as memory and therefore increase the Web server footprint A Administrators still need to install service packs that address bugs in the disabled features even though they re never used A Administrators still need to install software updates for the disabled features In other words administrators have to maintain the service features that are never used All these prob lems stem from the fact that the architecture of IIS 6 0 is relatively monolithic The main installation problem with a monol
17. er Take one of the following steps to launch the Server Manager Q Select Start gt All Programs gt Administrative Tools Server Manager from Administrative Tools to launch the Server Manager tool shown in Figure 1 8 QA First launch the Control Panel double click the Administrative Tools icon in the Control Panel and then double click the Server Manager to launch the Server Manager tool shown in Figure 1 8 As Figure 1 8 shows the left pane contains a node named Server Manager which in turn contains a child node named Roles As just discussed a server can be in one or more roles As you can see from Figure 1 8 in a clean install of Windows Server 2008 the server is originally in no roles The role that you re inter ested in is the Web Server role Recall that this is the role that allows the server to share information on the Internet an intranet or an extranet The first order of business is to launch a wizard named Add Roles to add this role to your server 14 52539c01 gxd WroxPro 9 17 07 6 51 PM Page 15 F Chapter 1 IIS 7 and ASPNET Integrated Architecture Machine Level 1 machine config and root web config C Machine Level 2 applicationHost config gt C Site Level web config Application Level web config D Virtual Directory Level web config Figure 1 8 To launch the Add Roles Wizard do one of the following Q Click the Add Roles link button in Roles Summary panel
18. ess everything in the background which means that you won t be able to see when the setup is completed Unattended Setup Option As mentioned earlier the pkgmgr exe command line tool comes with the n unattend xml option unattend xml is the XML file that contains the updates to be installed or uninstalled This XML file provides you with two benefits First you don t have to directly enter the names of the updates on the command line Second you can store this file somewhere for reuse in other Web server machines This XML file must have the same schema as the XML file shown in Listing 1 1 This listing installs the IIS Command HttpFeatures update and the updates that it depends on as discussed in the previous section 20 52539c01 qxd WroxPro 9 17 07 6 51 PM Page 21 F Chapter 1 IIS 7 and ASPNET Integrated Architecture Listing 1 1 The unattend xml File lt xml version 1 0 gt lt unattend xmlns urn schemas microsoft com unattend xmlns wem http schemas microsoft com WMIConfig 2002 State gt lt servicing gt lt Install a selectable update in a package that is in the Windows Foundation namespace gt lt package action configure gt lt assemblyIdentity name Microsoft Windows Foundation Package version 6 0 5308 6 language neutral processorArchitecture x86 publicKeyToken 31bf3856ad364e35 versionScope nonSxS gt lt selection name IIS WebServerRole state true gt lt selection name WAS Wind
19. ge 9 F Chapter 1 IIS 7 and ASPNET Integrated Architecture As Figure 1 5 shows the incoming request first goes through the IIS 6 0 pipeline At some point along this pipeline IIS 6 0 uses its metabase to map the request to a particular handler The requests for ASP NET resources such as ASP NET pages are mapped to the aspnet_isapi d11 handler This han dler then loads the CLR and the target ASP NET application if they haven t already been loaded This is where the ASP NET request processing pipeline kicks in At the beginning of the request ASP NET allows the components in its request processing pipeline to register one or more event handlers for one or more ASP NET application level events ASP NET then fires these events one after another and calls these event handlers to allow each component to perform its specific request processing task At some point along the pipeline ASP NET uses the configuration file to map the request to a particular handler The main responsibility of the handler is to process the request and generate the appropriate markup text which will then be sent back to the requesting browser Having two separate pipelines that is IIS and ASP NET pipelines working on the same request intro duces the following problems Q There s a fair amount of duplication For example both pipelines contain an authentication component which means that the same request gets authenticated twice Q Because the ASP NET pipeline
20. ithic architecture is that it s based on an all or nothing paradigm where you have no choice but to install the whole system IIS 7 0 is modular to the bone Its architecture consists of more than 40 feature modules from which you can choose This allows you to install only the needed feature modules to build a highly customized thin Web server This provides the following important benefits Decreases the footprint of your Web server A Administrators need to install only those service packs that address bugs in the installed feature modules A Administrators need to install software updates only for the installed feature modules So administrators have to maintain and service only installed feature modules Next I provide an overview of the IIS 7 feature modules or components These feature components are grouped into what are known as functional areas where each functional area maps to a specific IIS pack age update That is each package update contains one or more feature modules or components As you ll see later you ll use these package updates to custom build your Web server The top level IIS update is known as IIS WebServerRole and contains the updates shown in Figure 1 1 As the name suggests the IIS WebServerRole update enables Windows Server 2008 and Windows Vista to adopt a Web server role which enables them to exchange information over the Internet an intranet or an extranet C 11IS WebServerRole D HE II
21. lling a server role you don t have to install all its associated role services Here is an example There is a server role known as Web Server which enables a server to exchange information over the Internet an intranet or an extranet Another example of a server role is UDDI Services This role enables a server to provide its clients with Universal Description Discovery and Integration UDDI services to exchange information about Web services over the Internet an intranet or an extranet A feature is a piece of software that does not belong to any particular role but it provides services to one or more server roles and their associated role services An example of a feature is the Windows Process Activation Service This service enables the server in the Web Server role to process requests made through all kinds of communication protocols such as TCP or HTTP A role role service or feature may depend on other roles role services and features For example the UDDI Services depend on the Web Server role for the actual exchange of information over the Internet intranet or extranet When you attempt to install a role role service or feature that depends on other roles role services and features the Server Manager prompts you to approve the installation of the roles role services and features on which the role role service or feature being installed depends Now back to the business at hand which is building a customized Web serv
22. native modules you can apply your ASP NET managed modules to non ASP NET content For example you can use the ASP NET authentication and authorization modules to protect the non ASP NET contents of your application such as asp pages 52539c01 qxd WroxPro 9 17 07 6 51 PM Page 10 F Chapter 1 IIS 7 and ASPNET Integrated Architecture Request Integrated Request Processing Pipeline Authentication Module Preprocessing Modules Authorization Module Request PageHandlerFactory Handler Mapper StaticFile Compression Module Postprocessing Modules Logging Module Response Figure 1 6 S 7 and ASP NET Integrated Configuration Systems 10 In IIS 6 0 two separate configuration systems govern the IIS and ASP NET pipelines These configura tion systems store their configuration settings in two different storage media with two different schemas IIS configuration settings are stored in the IIS 6 0 metabase whereas ASP NET configuration settings are stored in ASP NET configuration files Such separation of configuration systems makes the task of administering the Web server and its sites and applications much more complex and trouble some For one thing there s no way to delegate site and application specific IIS configuration settings to site and application administrators without compromising the integrity and security
23. ncludes El Health and Diagnostics Z HTTP Logging O Logging Tools Request Monitor O Tracing C Custom Logging T ODBC Leacing More about role services ASP NET ASP and Web server extensions You can use the Web Server to host an internal or external Web site or to provide an environment for developers to create Web based applications Confirm Installation Selections Installation Progress Installation Results oo0000 Figure 1 12 17 52539c01 qxd WroxPro 9 17 07 6 51 PM Page 18 Chapter 1 IIS 7 and ASPNET Integrated Architecture 18 Add Roles Wizard x pr Select Role Services Before You Begin Select the role services to install for Web Server IIS Select Server Roles Role services Description Web Server 15 Td Common HTTP Features e Y Static Content web server functionality in the entire Y Default Document request pipeline the configuration and Confirm Installation Selectir aos 3 iT Developers can use the familiar extensblity model and rich Installation Progress APIS to build Web server features la P n e just as powerful as those Installation Results gt Add role services required for ASP NET dais EROS CASE You cannot install ASP NET unless the following role services are also installed El Web Server IS E Web Server amp Application Development ISAPI Extensions ISAPI Fiters Why are these role services required y
24. ndows Authentication a E Microsoft Message Queue MSMO Server EA MSMO DCOM Proxy gt DERA qa OK Cancel Help Figure 1 7 4 Expand the Internet Information Services option to see the tree of update nodes discussed in the previous sections You can install or uninstall each update by simply toggling it on or off and finally clicking the OK button Notice that when you select an update its parent update and the update that it depends on are automatically selected 13 p 52539c01 qxd WroxPro 9 17 07 6 51 PM Page 14 F Chapter 1 IIS 7 and ASPNET Integrated Architecture As you can see building your own custom Web server with the Windows Features dialog is a piece of cake You don t have to worry about the update dependencies it s all taken care of behind the scenes As you ll see in the following section you don t have this luxury if you use the other two IIS 7 installation options Server Manager In this section I show you how to use the Server Manager tool to build your customized Web server on the Windows Server 2008 operating system Before doing so you need to familiarize yourself with three basic Windows Server 2008 terms known as roles role services and features Every server provides its clients with a set of services These services are grouped into what are known as roles Installing a server role means installing one or more role services that belong to the role In other words when you re insta
25. ng table At the time of this writing Microsoft announced that it would be releasing a significantly enhanced IIS 7 FTP server for Longhorn and as a separate download for Vista Feature Module Description IIS FTPServer Use this module to install the FTP service IIS FTPManagement Use this module to install the FTP Management Console WAS WindowsActivationService Figure 1 4 presents the feature modules in the WAS WindowsActivationService package update These modules provide the base infrastructure for process activation and management WAS WindowsActivationService L WAS ProcessModel WAS NetFxEnvironment WAS ConfigurationAPI Figure 1 4 52539c01 gxd WroxPro 9 17 07 6 51 PM Page 8 F Chapter 1 IIS 7 and ASPNET Integrated Architecture Extensible Architecture of IIS 7 IIS 6 0 allows you to extend the functionality of the Web server by implementing and plugging in your own custom ISAPI filter and extension modules Unfortunately ISAPI suffers from fundamental prob lems such as Q Because ISAPI is not a convenient or friendly API writing an ISAPI filter or extension module is not an easy task to accomplish It can take a lot of time and tends to be error prone Q ISAPlIis not a managed API which means that ASP NET developers cannot benefit from the rich features of the NET Framework when they re writing ISAPI filter and extension modules IIS 7 0 has replaced ISAPI with
26. ng table describes the feature modules contained in the IIS WebServerManagementTools update Feature Module Description IIS ManagementConsole This module installs the Web Server Management Console which allows administration of local and remote IIS Web servers IIS ManagementScriptingTools Use this module to enable your Web server to support local Web server management via IIS configuration scripts IIS ManagementService Use this module to enable your Web server to be managed remotely via Web Server Management Console The following table presents the feature modules in the IIS IIS6ManagementCompatibility update 52539c01 gxd WroxPro 9 17 07 6 51 PM Page 7 F Chapter 1 IIS 7 and ASPNET Integrated Architecture Feature Module Description TIS Metabase Use this module to enable your Web server to support metabase calls to the new IIS 7 configuration store IIS WMICompatibility Use this module to install the IIS 6 0 WMI scripting interfaces to enable your Web server to support these interfaces IIS LegacyScripts Use this module to install the IIS 6 0 configuration scripts to enable your Web server to support these scripts IIS LegacySnapIn Use this module to install the IIS 6 0 Management Console to enable administration of remote IIS 6 0 servers from this computer IIS FTPPublishingService The feature modules contained in the IIS FTPPublishingService package update are discussed in the fol lowi
27. nstall logging tools and scripts on your Web server IIS RequestMonitor Use this module to enable your Web server to monitor the health of the Web server and its sites and applications IIS HttpTracing Use this module to enable your Web server to support tracing for ASP NET applications and failed requests IIS CustomLogging Use this module to enable your Web server to support custom logging for the Web server and its sites and applications IIS ODBCLogging Use this module to enable your Web server to support logging to an ODBC compliant database 52539c01 qxd WroxPro 9 17 07 6 51 PM Page 5 F Chapter 1 IIS 7 and ASPNET Integrated Architecture IIS Security The IIS Security package update contains the feature modules described in the following table Security Feature Module Description IIS BasicAuthentication Use this module to enable your Web server to sup port the HTTP 1 1 Basic Authentication scheme This module authenticates user credentials against Windows accounts TIS WindowsAuthentication Use this module to enable your Web server to authenticate requests using NTLM or Kerberos IIS DigestAuthentication Use this module to enable your Web server to sup port the Digest authentication scheme The main dif ference between Digest and Basic is that Digest sends password hashes over the network as opposed to the passwords themselves IIS ClientCertificateMappingAuthentication Use this module to enable your Web server to
28. ol dialog The content of this dialog depends on the privileges of your account If your account has administrator privileges the dialog will just ask you for confirma tion If your account does not have administrator privileges the dialog will present you with the list of accounts with administrator privileges asking you to choose one and enter the required password Keep in mind that you ll get this dialog even if you have logged in as an account that has administrator privileges This is one of the new security features Windows Features 10 x Turn Windows features on or off To turn a Windows feature on or off click to select or clear a check box and click OK A filled box means that only part of the feature is turned on To see what s included in a feature double click the feature E Indexing Service a a E P Internet Information Services Wip FTP Publishing Service Y 4 Web Management Tools Wip World Wide Web Services W Application Development Features WV 4 NET Extensibility TP ASP Mh ASP NET Mp cal S s Ii alr V ISAPI Extensions ISAPI Filters YI ja iS V Server Side Includes ommon Http Features 1 8 Health and Diagnostics J Performance Features 2 Security VI Basic Authentication Ip Client Certificate Mapping Authentication Ip Digest Authentication Y 4 OS Client Certificate Mapping Authentication V IP Security T Request Filtering VJ URL Authorization Y Wi
29. owsActivationService state true gt lt selection name WAS ProcessModel state true gt lt selection name IIS WebServer state true gt lt selection name IIS CommonHttpFeatures state true gt lt package gt lt servicing gt lt unattend gt Notice that the lt servicing gt element contains one or more lt selection gt child elements and each child element specifies a particular update The lt selection gt child element features two attributes named name and state The name attribute contains the update name to be installed or uninstalled Set the state attribute to true to install or false to uninstall the specified update Upgrade If you re upgrading from Windows XP to Windows Vista or from Windows Server 2003 to Windows Server 2008 and if your old operating system has IIS installed the Windows Vista or Windows Server 2008 setup automatically scans through the capabilities of the installed IIS and ensures that the new install of IIS 7 supports those features and capabilities Unfortunately due to the monolithic architecture of IIS 5 1 and IIS 6 0 this installation ends up installing almost all of the feature modules of IIS 7 I highly recommend that after the upgrade you use one of the previously discussed installation options to unin stall the updates that you do not need to decrease the attack surface and footprint of your Web server Summary This chapter first covered the IIS 7 package updates and their cons
30. raphical and imperative management support for your own custom configuration sections Building a Customized Web Server IIS 7 setup is completely modular allowing you to custom build your Web server from a list of more than 40 available feature modules This ensures that your Web server contains only the feature modules you need thereby decreasing the attack surface and footprint of your server In this section I walk you through the steps that you need to take to build your very own custom Web server on Windows Vista including Windows Vista Home Premium Windows Vista Professional and Windows Vista Ultimate editions and Windows Server 2008 operating systems In general there are five different IIS 7 setup options Q Windows Features dialog Windows Vista only Q Server Manager tool Windows Server 2008 only Qo pkgmgr exe command line tool both Windows Vista and Windows Server 2008 11 52539c01 qxd WroxPro 9 17 07 6 51 PM Page 12 F Chapter 1 IIS 7 and ASPNET Integrated Architecture Q Unattended both Windows Vista and Windows Server 2008 Q Upgrade both Windows Vista and Windows Server 2008 Before drilling down into the details of these five setup options you need to understand the dependen cies between the installable updates Update Dependencies When you re installing an update you must also install the updates that it depends on In general there are two types of dependencies interdependencies and parent
31. tituent feature modules and showed you how to custom build your own Web server from the desired package updates to decrease the foot print of your Web server The chapter then provided in depth coverage of five different 1157 setup options The chapter also gave an overview of the main systems that make up the IIS7 and ASP NET integrated infrastructure As discussed one of these systems is the IIS7 and ASP NET integrated configu ration system which will be discussed thoroughly in the next chapter 21 52539c01 qxd WroxPro 9 17 07 6 51 PM Page 22 F
Download Pdf Manuals
Related Search
Related Contents
www.lexmark.com Guia do Usuário Março de 2004 User Manual Learning ZIL STIHL FS 110/110 R Lightweight Trimmer Copyright © All rights reserved.
Failed to retrieve file