Deploying .NET Applications Lifecycle Guide Information in This Document, Including URL and Other Internet Web Site References, Is Subject to Change Without Notice
Total Page:16
File Type:pdf, Size:1020Kb
Deploying .NET Applications Lifecycle Guide Information in this document, including URL and other Internet Web site references, is subject to change without notice. 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, e-mail address, logo, person, place or event is intended or should be inferred. 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. © 2002 Microsoft Corporation. All rights reserved. Version 1.0 Microsoft, Active Directory, ActiveX, Authenticode, FrontPage, SQL Server, Visual Basic, Visual C++, Visual SourceSafe, Visual Studio, Windows, and Windows NT 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. Contents Chapter 1 Introducing Deployment of .NET Applications 1 Understand the Deployment Process . 1 Manage the Different Deployment Environments . 3 Practice Deployment and Create Backup Plans . 5 Choose Appropriate Deployment Tools and Mechanisms . 5 Moving Forward with Your Deployment . 6 Chapter 2 Deploying the .NET Framework with Your .NET Applications 7 Understand Your Application Dependencies on the .NET Framework . 7 Common Language Runtime . 7 .NET Framework Class Library . 8 Deploy the .NET Framework for Windows Forms-based Applications . 8 Determine Whether the .NET Framework Is Required for Browser-based Applications . 9 Deploy the .NET Framework to Web Servers . 9 Deploy the .NET Framework to Business Logic Servers . 10 Determine Whether You Need to Deploy the .NET Framework to Database Servers . 11 Deploy the Redistributable .NET Framework When Required . 11 Obtain the Redistributable .NET Framework . 11 Install Localized Versions of the .NET Framework When Required . 12 Ensure that You Deploy the .NET Framework to Supported Platforms . 12 Determine Other Dependencies for the .NET Framework and Your Application . 13 Ensure that You Adhere to the Redistributable .NET Framework License Agreements . 14 Choose a Mechanism for Deploying the .NET Framework. 14 Must be Administrator to Install the Framework . 15 Distributing the .NET Framework with Your Application . 15 Distributing the .NET Framework Separately from Your Application . 16 Deploying Visual Studio .NET . 16 Consider Using SMS to Deploy Visual Studio .NET . 18 References . 18 iv Contents Chapter 3 Visual Studio .NET Deployment Projects 19 Use Visual Studio .NET Setup and Deployment Projects . 19 Manage Your Setup Routines . 19 Create Windows Installer Files for Your Application . 20 Standard Setup Projects . 21 Web Setup Projects . 21 Design Your Windows Installer Files . 21 Set Project Properties for Your Windows Installer . 28 Build Your Windows Installer File . 31 Merge Module Projects . 33 Use the Module Retargetable Folder to Allow Other Developers to Control where Your Files Are Installed . 34 Set Project Properties for Your Merge Module . 34 Build Your Merge Module . 35 CAB Projects . 35 Windows Installer Platform SDK . 35 Advanced Options with Orca and MsiMsp . 36 Use Orca to Create Nested Installations . 36 Third-Party Installation Tools . 37 Chapter 4 Deployment Issues for .NET Applications 39 Deploy Web Applications . 39 Deploy ASP.NET Application Files . 39 Deploy IIS Settings . 40 Deploy Secure Sockets Layer Encryption . 42 Deploy HTTP Handlers and HTTP Modules . 43 Use Application Center to Deploy Web Applications to Web Farms . 44 Pre-Compile Your ASP.NET Application . 44 Use Aspnet_regiis.exe to Manage Multiple Versions of the .NET Framework for Your Web Applications . 46 Deploy Web Services . 46 Deploy Discovery Files. 46 Do Not Deploy Dynamic Discovery Files . 48 Deploy XML Schema Definition (XSD) Files . 49 Deploy Windows Forms Applications . 50 Deploy with Windows Installer Files . 50 Deploy with Simple Copy Operations . 51 Use Internet Deployment to Achieve Zero Install and Zero Administration for Client Computers . 52 Contents v Deploy Assemblies . 54 Deploy Private Assemblies . 55 Deploy Shared Assemblies to the Global Assembly Cache. 58 Use Installation Components to Create and Configure Application Resources . 60 Use Installer Classes to Perform Custom Installation Operations . 60 Use Predefined Installation Components to Create and Configure Application Resources . 61 Deploy Enterprise Services Components . 66 Use Dynamic Registration Only if Your Process Has Administrative Privileges . 66 Use an Installer Class to Register Your Serviced Component . 67 Consider Traditional COM+ Deployment Issues for Your Serviced Components . 68 Deploy Instrumented Assemblies . 69 Manage the Deployment of Configuration Files . 70 Manage the Deployment of Environment-Specific Configuration Settings . 71 Deploy the Production Configuration File to the Test Environment and Replace it after Install . 74 Store Application Settings in Your Application Configuration File . 75 Deploy Security Policy . 75 Use the .NET Framework Configuration Tool to Package Security Policy in Windows Installer Files . 75 Deploy Your Security Policy Windows Installer File . 76 Use Scripts and Caspol.exe to Apply Security Policy . 76 Verify Permissions Granted to Your Assemblies . 77 Deploy Session State Settings with Your Solution . 77 COM Interop Deployment Considerations . 78 Deploy All Required COM Components with.