Powered By Blogger

Wednesday, April 24, 2013

Windows Server 2008 R2: Deploying and Managing ASP.NET Using IIS 7.5 on Server Core


 

Windows Server 2008 R2 Hands-on Lab
Windows Server 2008 R2: Deploying and Managing ASP.NET Using IIS 7.5 on Server Core
In this lab you will install an ASP.NET Web site on Windows Server 2008 R2 Core. You will begin by using the OCSetup and DISM commands to install the required components for ASP.NET. Next, you will install and configure the IIS Management Service. You will then use IIS Manager on a remote computer to configure a new Web site, which contains an ASP.NET application on Server Core. Finally, you will use the IIS Deployment Tool to migrate a site from a production Server Core computer to a development server for upgrades.

Produced by HynesITe, Inc.
Version 3.0
8/18/09




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.
The names of manufacturers, products, or URLs are provided for informational purposes only and Microsoft makes no representations and warranties, either expressed, implied, or statutory, regarding these manufacturers or the use of the products with any Microsoft technologies. The inclusion of a manufacturer or product does not imply endorsement of Microsoft of the manufacturer or product.  Links are provided to third party sites.  Such sites are not under the control of Microsoft and Microsoft is not responsible for the contents of any linked site or any link contained in a linked site, or any changes or updates to such sites. Microsoft is not responsible for webcasting or any other form of transmission received from any linked site. Microsoft is providing these links to you only as a convenience, and the inclusion of any link does not imply endorsement of Microsoft of the site or the products contained therein.
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.
Copyright © 2009 Microsoft Corporation. All rights reserved.
Microsoft and Windows 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.
Version 1.0

Introduction
Estimated time to complete this lab
45 minutes
Objectives
After completing this lab, you will be able to:
Install IIS on Windows Server 2008 R2 Core
Enable ASP.NET applications
Configure remote management
Manage IIS using Windows PowerShell
Prerequisites
Before working on this lab, you must have:
An understanding of Web servers and Web server-related concepts
A conceptual understanding of .NET and ASP.NET
The ability to work in a command line environment
Overview of Lab
In this lab you will install an ASP.NET Web site on Windows Server 2008 R2 Core. You will begin by using the OCSetup and DISM commands to install the required components for ASP.NET. Next, you will install and configure the IIS Management Service. You will then use IIS Manager on a remote computer to configure a new Web site which contains an ASP.NET application on Server Core. Finally, you will use the IIS Web Deployment Tool to migrate a site from a production Server Core computer to a development server for upgrades.
Scenario
Woodgrove Bank is deploying a new customer service Web site. The site is based on an ASP.NET application. You have received the first version of the Web site from your developer and you need to deploy the site onto a new Web server running Windows Server 2008 R2 Core. Once you have deployed the site and verified that it is operational, you have to move a copy of the site to your development server so that it can be further enhanced.
Virtual Machine Technology
The computers in this lab are virtual machines that are implemented using Microsoft Hyper-V. Before starting each virtual machine, ensure you apply the Start-Lab snapshot. When you have started a virtual machine, log on by pressing CTRL+ALT+END and supplying the credentials listed in the lab instructions.

Computers in this Lab
This lab uses computers as described in the following table. Before you begin the lab, you must start the virtual machines and then log on to the computers. Ensure the BAL-DC-01 virtual machine is fully started before starting any other virtual machines.
Virtual Machine Role
R2Lab-BAL-DC-01 Domain Controller
R2Lab-BAL-CORE-01 IIS Web Server running on Server Core
All user accounts in this lab use the password Passw0rd!
Note Regarding User Account Control
Some steps in this lab may be subject to user account control. User account control is a technology which provides additional security to computers by requesting that users confirm actions that require administrative rights. Tasks that generate a user account control confirmation are denoted using a shield icon. If you encounter a shield icon, confirm your action by selecting the appropriate button in the dialog box that is presented.

Exercise 1:  Installing ASP.NET on Server Core
In this exercise you will complete the steps required to run an ASP.NET application on a Server Core computer. You will begin by installing the required components for ASP.NET and the core IIS Web server. You will then enable ASP.NET using the new DISM command line tool.
Enable ASP.NET Components
Begin this task logged on to BAL-CORE-01 as Administrator using the password Passw0rd!
1. In the Command Prompt, type the following command and then press ENTER:
The following command is case sensitive and will take approximately 1 minute to complete.
start /w ocsetup IIS-WebServerRole;IIS-WebServer;WAS-WindowsActivationService;WAS-ProcessModel
2. In the Command Prompt, type the following command and then press ENTER:
The following command is case sensitive.
start /w ocsetup IIS-CommonHttpFeatures;IIS-DefaultDocument;IIS-Security;IIS-RequestFiltering
3. In the Command Prompt, type the following command and then press ENTER:
The following command is case sensitive.
start /w ocsetup IIS-ApplicationDevelopment;IIS-ISAPIFilter;IIS-ISAPIExtensions;IIS-NetFxExtensibility;WAS-NetFxEnvironment
Enable ASP.NET Components
Begin this task logged on to BAL-CORE-01 as Administrator using the password Passw0rd!
1. In the Command Prompt, type the following command and then press ENTER:
The following command is case sensitive.
dism /online /enable-feature /featurename:IIS-ASPNET
You can verify that the feature was installed by typing DISM /Online /Get-Features.

Exercise 2:  Installing and Configuring IIS Management Components
In this exercise you will complete the steps required to enable the IIS Management service on Server Core. This will enable you to use IIS Manager to connect to the instance of IIS on the BAL-CORE-01 and manage Web sites. Without the IIS Management Services enabled for remote management, management of IIS on Server Core is very challenging.
Install IIS Management Components
Begin this task logged on to BAL-CORE-01 as Administrator using the password Passw0rd!
2. In the Command Prompt, type the following command and then press ENTER:
dism /online /enable-feature /featurename:IIS-ManagementService
3. In the Command Prompt, type the following command and then press ENTER:
dism /online /enable-feature /featurename:WAS-ConfigurationAPI
Enable the Management Service
Begin this task logged on to BAL-CORE-01 as Administrator using the password Passw0rd!
1. In the Command Prompt, type the following command and then press ENTER:
Reg Add HKLM\Software\Microsoft\WebManagement\Server /V EnableRemoteManagement /T REG_DWORD /D 1
2. Press Y and then press ENTER.
3. In the Command Prompt, type the following command and then press ENTER:
The default startup type for the Web Management services is manual.
SC Config WMSVC Start= Auto
4. In the Command Prompt, type the following command and then press ENTER:
NET START WMSVC

Exercise 3: Configuring an ASP.NET Web Site
In this exercise you will use Internet Information Services (IIS) Manager to connect to Internet Information Services (IIS) on the Server Core computer. You will then modify the properties of the Web site and configure it to serve an ASP.NET Web application.
Connect to the Web Site using IIS Manager
Begin this task logged on to BAL-DC-01 as woodgrovebank/administrator using the password Passw0rd!
1. On the Start menu, in Administrative Tools, click Internet Information Services (IIS) Manager.
2. In Internet Information Services (IIS) Manager, on the File menu, click Connect to a Server.
3. In Server Name, type BAL-CORE-01 and then click Next.
4. In User name, type woodgrovebank\administrator, in Password type Passw0rd! and then click Next.
5. In the Server Certificate Alert dialog box, click Connect.
You will receive a warning because a self signed certificate is the default certificate for remote management. This can be changed so that the certificate comes from a trusted CA.
6. Click Finish.
Configure the Web Site to Use an ASP.NET Application
Begin this task logged on to BAL-DC-01 as Administrator using the password Passw0rd!
1. In Internet Information Services (IIS) Manager, navigate to BAL-CORE-01 (Woodgrovebank\Administrator)\Sites and then click Default Web Site.
2. In the Actions pane, click Basic Settings.
3. In Physical path, type C:\WebSite\smallbusiness_rtw_vb and then click OK.
4. Under Default Web Site Home, click Content View.
Under Content View you can see the files located in the C:\WebSite\smallbusiness_rtw_vb folder.
5. Click Features View.
6. In the Actions pane, click Browse *:80 (HTTP).
The Web site for Fabrikam, Inc. should now appear.
7. Close Internet Explorer.

Exercise 4:  Using the Web Deployment Tool to Deploy Web Site Packages
In this exercise you will install and use the Microsoft Web Deployment Tool to deploy a copy of the production ASP.NET Web site on a development computer. This will be done to simplify migration of the Web site from the production server to a development server.
Install the Microsoft Web Deployment Tool
Complete this task logged on to BAL-DC-01 as Woodgrovebank/Administrator using the password Passw0rd! and ensure that you have Internet Information Services (IIS) Manager open.
1. In Internet Information Services (IIS) Manager, in the Connections pane, click BAL-CORE-01, and then on the File menu, click Disconnect.
2. Click Yes to confirm.
3. Using Windows Explorer, browse to C:\LabFiles and double-click x64_msdeploy_beta2.msi.
4. In the Web Deployment Tool Beta 2 Setup screen, click Next.
5. Select I accept the terms in the License Agreement and then click Next.
6. On the Choose Setup Type page, select Complete.
7. Click Install and then, once installation is complete, click Finish.
8. Ensure you are logged on to BAL-CORE-01 as Woodgrovebank\Administrator using the password Passw0rd!
9. In the Command Prompt, type the following command and then press ENTER:
C:\LabFiles\X64_msdeploy_beta2.msi
10. Repeat step 4 to 7 to complete the installation.
11. Switch to BAL-DC-01.
12. Close Internet Information Services (IIS) Manager and, when prompted, click No to not save the connection list.
13. On the Start menu, in Administrative Tools, click Internet Information Services (IIS) Manager.
14. In Internet Information Services (IIS) Manager, on the File menu, click Connect to a Server.
15. In Server Name, type BAL-CORE-01 and then click Next.
16. In User name, type woodgrovebank\administrator, in Password, type Passw0rd! and then click Next.
17. Click Connect.
18. Click Finish.
Package the Small Business Web Site
In this task you will package the production Web site on the Server Core computer using the Web Deployment Tool.
Begin this task logged on to BAL-DC-01 as Administrator using the password Passw0rd! and ensure that you have Internet Information Services (IIS) Manager open.
1. In Internet Information Services (IIS) Manager, navigate to BAL-CORE-01 (Woodgrovebank\Administrator)\Sites and then click Default Web Site.
2. In the Actions pane, click Create a package.
3. In the Create a Package dialog box, click Next.
4. Click Next.
5. In Package Path, type C:\PublicSite.zip and then click Next.
6. Click Finish.
Deploy the Small Business Web Site onto the Development Server
In this task you will use the package to install the production Web site on another Web server by importing the deployment package.
Begin this task logged on to BAL-DC-01 as Administrator using the password Passw0rd! and ensure that you have Internet Information Services (IIS) Manager open.
1. In Internet Information Services (IIS) Manager, click BAL-DC-01 (Woodgrovebank\Administrator).
2. In the Actions pane, click Install a package.
You may have to close and re-open the IIS Management console.
3. In Package Path, type c:\PublicSite.zip and then click Next.
4. Click Next.
5. When the package installation completes, click Finish.
6. In Internet Information Services (IIS) Manager, navigate to BAL-CORE-01 (Woodgrovebank\Administrator)\Sites and then click Default Web Site.
7. In the Features View, under Default Web Site Home, double-click Default Document.
8. Select default.aspx and then from the Actions pane, click Move Up.
9. In the Default Document dialog box, click Yes to continue.
10. In the Actions pane, click Move Up 5 more times until default.aspx is at the top of the list.
11. In the navigation pane, click Default Web Site and then in the Actions pane, click Browse *:80 (http).
The Web site for Fabrikam, Inc. should now appear indicating that you have successfully copied the Web site from BAL-Core-01 to BAL-DC-01 using the Web Deployment Tool.
This is the end of the lab.

No comments:

Post a Comment