IIS 8.
0 Administration
and Troubleshooting
Module 1
Student Lab Manual
Version 1.21
2013 Microsoft Corporation
Microsoft Confidential
Conditions and Terms of Use
Microsoft Confidential - For Internal Use Only
This training package is proprietary and confidential, and is intended only for uses described in the training materials.
Content and software is provided to you under a Non-Disclosure Agreement and cannot be distributed. Copying or
disclosing all or any portion of the content and/or software included in such packages is strictly prohibited.
The contents of this package are for informational and training purposes only and are provided "as is" without
warranty of any kind, whether express or implied, including but not limited to the implied warranties of
merchantability, fitness for a particular purpose, and non-infringement.
Training package content, including URLs and other Internet Web site references, is subject to change without
notice. Because Microsoft must respond to changing market conditions, the content 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. Unless otherwise noted, the 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.
2013 Microsoft Corporation. All rights reserved.
2013 Microsoft Corporation
Microsoft Confidential
Copyright and Trademarks
2013 Microsoft Corporation. All rights reserved.
Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual property rights covering
subject matter in this document. Except as expressly provided in 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.
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.
For more information, see Use of Microsoft Copyrighted Content at
[Link]
Microsoft, Internet Explorer, and Windows are either registered trademarks or trademarks of Microsoft
Corporation in the United States and/or other countries. Other Microsoft products mentioned herein may be either
registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries. All other
trademarks are property of their respective owners.
2013 Microsoft Corporation
Microsoft Confidential
Contents
LAB 1: EXPLORING IIS SETUP OPTIONS......................................................................................5
EXERCISE 1: INSTALL IIS WITH SERVER MANAGER............................................................................................6
EXERCISE 2: WINDOWS POWERSHELL V2 CMDLETS USAGE..............................................................................8
LAB 2: [Link] CONFIGURATION...............................................................................................9
EXERCISE 1: PERFORMANCE MONITORING FOR [Link]................................................................................9
EXERCISE 2: MANAGE [Link] USING NETSH..............................................................................................12
EXERCISE 3: CAPTURE ETW TRACE DATA FOR [Link].............................................................................14
2013 Microsoft Corporation
Microsoft Confidential
Lab 1: Exploring IIS Setup Options
Lab 1: Exploring IIS Setup Options
This lab will introduce the installation of the IIS web server and its related components
on Windows Server 2012.
Introduction
Each of the exercises in the lab will introduce a different tool and provide an alternative
way of installing and removing components from a Web server. This will help identify
their strengths and weaknesses.
Objectives
After completing this lab, you will be able to:
Perform an installation of the web server.
Prerequisites
Understand the concepts introduced in Module 1.
Estimated time to complete this lab
15 minutes
For more information
Login: CONTOSO\Administrator Password: Pa$$w0rd
2013 Microsoft Corporation
Microsoft Confidential
Lab 1: Exploring IIS Setup Options
Exercise 1: Install IIS with Server Manager
Objectives
In this exercise, you will:
Use Server Manager to install IIS
Identify the components installed after performing a basic install
Scenario
You wish to enable a Windows Server 2012 to perform as a web server.
Task 1: Web Server Installation on IIS01
1
Start Server Manager.
Under the Manage menu, select Add Roles and Features. Notice that you might
receive a warning indicating that Server Manager is still collecting the inventory of
installed components. If this is the case, wait for a minute and retry the operation.
Click Next on Before You Begin page.
Leave Role-based or feature-based Installation selected and click Next on the
Installation Type page.
In the Server Selection page leave current server selected and click Next.
In the Server Roles page, select Web Server (IIS) (accept the suggestion to install
the IIS Management Console by clicking the Add Features button on the Add Roles
and Features Wizard window) and click Next.
Skip feature selection in the Select Features page and click Next.
Click Next in the informational page for the Web Server Role (IIS) and go to the
Role Services page.
Review each Role Service and try to understand what it does. Expand the
Application Development node and select [Link] 4.5, accepting the proposed
dependencies. Click Next.
10 In the confirmation page, review the components that Server Manager will install as
part of this operation. Click on Install to proceed with the installation.
Note: You can close this wizard without interrupting running tasks. View task
progress or open this page again by clicking Notifications in the command bar, and
then Task Details. A text indicating this will be visible during the installation.
11 Once the Add Roles and Features Wizard completes the installation, click on the
Close button.
2013 Microsoft Corporation
Microsoft Confidential
Lab 1: Exploring IIS Setup Options
12 From the Windows Start screen, open Internet Information Services (IIS) Manager.
13 On the left navigation panel, click on the server icon. On the Features (central) panel,
check the available configuration options (icons).
Note: You may receive a prompt asking you to get started with Microsoft Web
Platform Installer. Cancel the dialog box at this time.
Question A: Do we have support for [Link] 3.5?
(Suggestion: check Handlers Mappings)
_________________________________________________________________
_________________________________________________________________
If not add [Link] 3.5 support with Server Manager.
1. Close Server Manager and Internet Information Services (IIS) Manager
2013 Microsoft Corporation
Microsoft Confidential
Lab 1: Exploring IIS Setup Options
11
Exercise 2: Windows PowerShell v2 CmdLets
Usage
Objectives
In this exercise, you will:
Use Windows PowerShell CmdLets to install IIS
Scenario
You wish to enable a Windows Server 2012 to perform as a web server.
Web Server Installation on IIS02
1 Start an elevated instance1 of Windows PowerShell.
2.
This will launch the Windows PowerShell command window.
3.
Use the Get-WindowsOptionalFeature CmdLet to browse the IIS role
services and features available, and their installation status (disabled).
Get-WindowsOptionalFeature Online | where FeatureName like IIS*
4.
Use the Enable-WindowsOptionalFeature CmdLet to install the web
server role and ASPNET support.
Enable-WindowsOptionalFeature Online FeatureName IIS-WebServerRole,IIS-ASPNET,IISASPNET45 -All
Question B: Why do we add both IIS-ASPNET and IIS-ASPNET45 ?
_________________________________________________________________
_________________________________________________________________
5.
Use the Enable-WindowsOptionalFeature CmdLet to install Classic
ASP (Active Server Pages) support.
Question C: Document the command used to add Classic ASP support
1 Notice that although the current lab setup does not need explicit elevation of
PowerShell, you will probably need it in your environment. This is because UAC
exempts the Administrator account, which always receives its full token.
2013 Microsoft Corporation
Microsoft Confidential
Lab 1: Exploring IIS Setup Options
13
_________________________________________________________________
_________________________________________________________________
2013 Microsoft Corporation
Microsoft Confidential
Lab 2: [Link] Configuration
Lab 2: [Link] Configuration
Introduction
The exercises in this lab discuss the configuration, administration, and management of
[Link] using:
PerfMon
Netsh
Event Tracing of Windows (ETW) Tracing
Objectives
After completing this lab, you will be able to:
Use PerfMon to measure performance of [Link].
Use Netsh to administer and configure [Link].
Use ETW Tracing to figure out the underpinnings of how [Link] works.
Prerequisites
Lab 1
Login Credentials
CONTOSO\Administrator Password: Pa$$w0rd
Estimated Time to Complete this Lab
60 minutes
Use server IIS01
2013 Microsoft Corporation
Microsoft Confidential
14
Lab 2: [Link] Configuration
15
Exercise 1: Performance Monitoring for
[Link]
In this exercise, you will use PerfMon to:
Collect data on [Link] cache performance.
Collect data on HTTP Request Queue status.
Collect and observer application specific data.
Task 1: [Link] Cache Performance HTTP Service
HTTP Service is the PerfMon object used to collect data related to the [Link]
Cache. It allows tracking the number of URIs cached, flushed, missed, etc. since the
service startup.
1. Copy the files [Link] and [Link] from C:\LabFiles\Module 1 into
C:\inetpub\wwwroot folder.
2. From the Start Menu, click on the Administrative Tools Tile. This will open a folder
on the desktop. Launch Performance Monitor
3. In the Performance Monitor window, select Performance Monitor on the left pane.
The default chart will appear on the main pane.
4. Click the Add button in the toolbar
to add all the counters for the HTTP Service
object so that they can be viewed in real-time. Select HTTP Service from the
Available Counters list. Click Add and then click OK.
5. Open two instances of Internet Explorer and make two requests as:
[Link]
[Link]
6. Press CTRL+F5 repeatedly to generate requests to these files and observe the
PerfMon counters after each repeated request.
Tip: These counters are best viewed in the Report view of PerfMon than the
default line view.
Question A:
What is the number of TotalUrisCached?
2013 Microsoft Corporation
Microsoft Confidential
Lab 2: [Link] Configuration
16
Task 2: HTTP Request Queue Status HTTP Service Queues
1. The object HTTP Service Request Queues sets request queue counters which track the
traffic per application pool at the [Link] level (since there is one request queue
associated with each application pool in the kernel).
2. In Performance Monitor, click the Add button to add HTTP Service Queues object from
the list of Available counters.
3. Performance Monitor lists the Application Pools in the instances section. Add all counters
for all instances for HTTP Service Queues object by selecting <All Instances> and
clicking the Add button. Press the OK button to go back to the Performance Monitor
main window.
a. Note: There is an unnamed instance present in the list when the Windows
Remote Management Service is running on the server.
4. Repeat Step 6 from Task 1 and notice the behavior of the counters involved for this
object.
Note: Unless there is a heavy traffic (volume and latency), it will be hard to get any
useful information from the counters here because they are measuring the latency
and rate of request arrival.
Question B:
Which counter would you use if you want to
find out the request currently queued in the Request Queue?
Task 3: HTTP Service Url Groups
The object HTTP Service Url Groups tracks the application specific data where each
application on the server is identified by its URL Group ID in the instances section.
1
Add all counters and instances for the object HTTP Service Url Groups and repeat
Step 6 from Task 1.
Note: Since the counters captured here include bytes transferred, GET requests
counters, and others, there would be some data to review here.
Note: Proceed to Exercise 2 to find out how the Group IDs from this object can be
resolved to the application pools.
2013 Microsoft Corporation
Microsoft Confidential
Lab 2: [Link] Configuration
Exercise 2: Manage [Link] using Netsh
In this exercise, you will:
Use Netsh to configure [Link].
Open an elevated Command Prompt instance.
6. Launch the Netsh help by typing netsh /?
C:\>netsh /?
Usage: netsh [-a AliasFile] [-c Context] [-r RemoteMachine] [-u [DomainName\]Use
rName] [-p Password | *]
[Command | -f ScriptFile]
The following commands are available:
Commands in this context:
?
- Displays a list of commands.
add
- Adds a configuration entry to a list of entries.
advfirewall - Changes to the `netsh advfirewall' context.
branchcache - Changes to the `netsh branchcache' context.
bridge
- Changes to the `netsh bridge' context.
delete
- Deletes a configuration entry from a list of entries.
dhcpclient
- Changes to the `netsh dhcpclient' context.
dnsclient
- Changes to the `netsh dnsclient' context.
dump
- Displays a configuration script.
exec
- Runs a script file.
firewall
- Changes to the `netsh firewall' context.
help
- Displays a list of commands.
http
- Changes to the `netsh http' context.
interface
- Changes to the `netsh interface' context.
ipsec
- Changes to the `netsh ipsec' context.
lan
- Changes to the `netsh lan' context.
mbn
- Changes to the `netsh mbn' context.
namespace
- Changes to the `netsh namespace' context.
nap
- Changes to the `netsh nap' context.
netio
- Changes to the `netsh netio' context.
p2p
- Changes to the `netsh p2p' context.
ras
- Changes to the `netsh ras' context.
rpc
- Changes to the `netsh rpc' context.
set
- Updates configuration settings.
show
- Displays information.
trace
- Changes to the `netsh trace' context.
wcn
- Changes to the `netsh wcn' context.
wfp
- Changes to the `netsh wfp' context.
winhttp
- Changes to the `netsh winhttp' context.
winsock
- Changes to the `netsh winsock' context.
wlan
- Changes to the `netsh wlan' context.
The following sub-contexts are available:
advfirewall branchcache bridge dhcpclient dnsclient firewall http interface ips
ec lan mbn namespace nap netio p2p ras rpc trace wcn wfp winhttp winsock wlan
To view help for a command, type the command, followed by a space, and then
2013 Microsoft Corporation
Microsoft Confidential
17
Lab 2: [Link] Configuration
18
type ?.
7. Notice that HTTP is one of the sub-contexts available. To find out more options in
this sub-context, type netsh http /?
C:\>netsh http /?
The following commands are available:
Commands in this context:
?
- Displays a list of commands.
add
- Adds a configuration entry to a table.
delete
- Deletes a configuration entry from a table.
dump
- Displays a configuration script.
flush
- Flushes internal data.
help
- Displays a list of commands.
show
- Displays information.
To view help for a command, type the command, followed by a space, and then
type ?.
8. Help on the command show will reveal more information on different objects that
can be used within the http sub-context of netsh. Type netsh http show /?
9. Using each of the objects from the above command we can find out more information
about the following:
a. SSL Certificates
b. IP Listen Lists
c. Cache Parameters
d. Timeouts
e. Service State
f.
URL Namespace Reservations
A
What is the command to get IP Listen List for the
servers?
Question C:
How do we find the reserved URL namespaces?
2013 Microsoft Corporation
Microsoft Confidential
Lab 2: [Link] Configuration
19
Question D:
How do you obtain the URL Group ID for the
applications running on the server
Exercise 3: Capture ETW Trace Data for
[Link]
In this exercise, you will:
Use ETW to capture the inner workings of [Link].
The ETW framework has a new provider Microsoft-Windows-HttpService, which
captures [Link] related data. By subscribing to this provider, you can collect
information about the inner workings of [Link].
[Link] is the command that creates and manages Event Trace sessions.
1
Type following command on command prompt to get a list of all the providers ETW
offers
C:\> logman query providers > [Link]
C:\> notepad [Link]
10. Locate a provider called Microsoft-Windows-HttpService from the list.
11. Run following command to list the event categories offered by Microsoft-WindowsHttpService provider
C:\> logman query providers Microsoft-Windows-HttpService > [Link]
C:\> notepad [Link]
12. Run following command to start a trace named httptrace, which captures all the
event categories from the provider Microsoft-Windows -HttpService and logs
informational messages
C:\> logman start httptrace p Microsoft-Windows-HttpService 0xFFFF 0x4 ets
13. Make multiple request to the web server by opening following pages in the browser:
[Link]
[Link]
[Link]
2013 Microsoft Corporation
Microsoft Confidential
Lab 2: [Link] Configuration
20
14. Stop the ETW trace
C:\> logman stop httptrace ets
15. Verify that a file named [Link] has been created in the directory.
16. Use tracerpt to generate a readable output from the httptrace file.
C:\> tracerpt [Link]
17. Review the [Link] and [Link] files for data associated with the events
captured during the processing of the files requested above.
2013 Microsoft Corporation
Microsoft Confidential