Sie sind auf Seite 1von 18

2 Table of Contents

Table of Contents

Internet Information Services 6.0.............................................................................................................. 3


Exercise 1 Installation and Lockdown of IIS 6.0 ................................................................................................4
Exercise 2 Application Pools, Worker Processes and Web Gardens ..................................................................9
Exercise 3 XML MetaBase ...............................................................................................................................15
Internet Information Services 6.0 3

Internet Information Services 6.0

Objectives After completing this lab, you will be able to:


„ Install IIS and create a simple Active Server Page file.
„ Use of Application Pools, Worker Processes and Web Gardens in IIS 6.0.
„ Back up and edit the IIS 6.0 metabase files, while IIS 6.0 is running.

Scenario Windows® Server™ 2003 Active Directory® has improvements in such areas as
performance, management and security. Over the course of the next hour, we
will step through some of the improvements available through Internet
Information Services 6.0, which provides significantly improved security. To
reduce the attack surface of systems, IIS 6.0 is not installed by default on
Windows Server 2003 – administrators must explicitly select and install it. IIS
6.0 ships in a locked-down state, serving only static content. Using the Web
service extension node, Web site administrators can enable or disable IIS
functionality based on the individual needs of the organization.
The IIS 6.0 fault-tolerant process architecture isolates Web sites and
applications into self-contained units called application pools. IIS 6.0 worker
process isolation mode also enables multiple worker processes to be configured
to service requests for a given application pool, a configuration known as a
Web garden.
IIS 6.0 features many new management tools designed to reduce the amount of
time it takes to manage your Web server infrastructure. These features include a
plain text XML configuration file that can be modified without having to stop
the server.

Estimated time to
complete this lab: 50
minutes
4 Internet Information Services 6.0

Computers used in this Lab:

Paris

Madrid

Exercise 1
Installation and Lockdown of IIS 6.0

Scenario
In this exercise, you will install IIS 6.0 and examine the default configuration. The Remote Desktop
Web Connection is used as a sample Web site. Additionally, we will create a simple Active Server
Page (ASP) file.
Complete this Exercise using:

Paris

Madrid

Tasks Detailed steps

Complete the following 4 tasks a. Click the Paris link in the My Machines browser.
on: b. Click in the virtual machine window.
c. Press Right-ALT + DEL.
Paris
d. Log on as CONTOSO/Administrator with a password of password.
1. First, we will use Manage
e. Click Start | Manage Your Server.
Your Server to examine the
current server roles. Note: The Manage Your Server window shows that Paris currently has two
roles: Domain Controller (Active Directory) and DNS Server.
f. In the Manage Your Server window, click Add or remove a role.
Info: The Configure Your Server wizard starts. This wizard is also
available from the Administrative Tools menu.
g. On the Preliminary Steps screen, click Next.
h. On the Server Role screen, in the Server Role list box, select
Application server (IIS, ASP.NET).
Info: When IIS is installed on Windows Server 2003, the server is said to
have the Application server role. By default, IIS is NOT installed on
Windows Server 2003.
i. On the Server Role screen, click Cancel to close the Configure Your
Internet Information Services 6.0 5

Server wizard.
Info: In order to see and install custom configurations of components for
IIS 6.0, you must use Add or Remove Programs from the Control Panel.
j. Close Manage Your Server.
2. Now we will perform a a. Click Start | Control Panel and click Add or Remove Programs.
manual install of IIS 6.0 so b. In Add or Remove Programs, click Add/Remove Windows
that we can take a closer Components.
look at its components. We c. On the Windows Components screen, select Application Server (do
will also install another Web NOT select the check box) and click Details.
site to use as an example
d. In the Application Server dialog box, select the Internet Information
during these exercises.
Services (IIS) subcomponent (do NOT select the check box) and click
Details.
e. In the Internet Information Services (IIS) dialog box, select World
Wide Web Service (do NOT select the check box) and click Details.
f. In the World Wide Web Service dialog box, click to select the World
Wide Web Service and the Remote Desktop Web Connection check
boxes and click OK.
Note: The Remote Desktop Web Connection is used as a sample Website in
this exercise.
g. In the Internet Information Services (IIS) dialog box, ensure that the
following subcomponents are enabled:
• Common Files
• Internet Information Services Manager
• World Wide Web Service (partly enabled)
h. Click OK.
i. In the Application Server dialog box, ensure that the following
subcomponents are enabled:
• Enable network COM+ access
• Internet Information Services (IIS) (partly enabled)
j. Click OK.
k. On the Windows Components screen, click Next.
Note: Please wait a few minutes while Setup installs and configures the
selected components.
l. On the Completing the Windows Components Wizard screen, click
Finish.
m. Close Add or Remove Programs.
3. We must use the new IIS a. Click Start | Administrative Tools and click Internet Information
Manager to examine or Services (IIS) Manager.
modify the default IIS 6.0 b. In Internet Information Services (IIS) Manager, ensure that Paris
configuration. (local computer) is expanded and, in the left pane, select Web Service
Extensions.
Info: By default, IIS is not installed on Windows Server 2003. And after it
is installed, only static Web content will be available. All other
functionality, such as Active Server Pages and WebDAV, has to be enabled
explicitly before it can be used.
c. In the left pane, right-click Web Sites and click Properties.
d. In the Web Sites Properties dialog box, click Service.
Note: IIS 6.0 has two distinct modes of operation, called isolation modes.
The default for new installations of IIS 6.0 is worker process isolation
mode. For compatibility reasons, upgrades from earlier version of IIS
default to IIS 5.0 isolation mode. Worker process isolation mode (and
6 Internet Information Services 6.0

application pools) is examined in more detail in a later exercise.


e. Click Cancel to close the Web Sites Properties dialog box.
4. In IIS Manager, we a. In Internet Information Services (IIS) Manager, expand Web Sites,
examine the virtual expand Default Web Site and select tsweb.
directory name for the Note: The virtual directory name for the Remote Desktop Web Connection
Remote Desktop Web Web page is tsweb.
Connection Web page.
Complete the following task a. Click the Madrid link in the My Machines browser.
on: b. Click in the virtual machine window.
c. Press Right-ALT + DEL.
Madrid
d. Log on as CONTOSO\Administrator with a password of password.
5. Now we will connect to and
open the Remote Desktop e. Click the Internet Explorer icon in the Quick Launch menu.
Web Connection Web f. The Internet Explorer enhanced Security Configuration is Enabled
page. screen appears.
g. In Internet Explorer, type http://paris/tsweb in the Address field and
press Enter.
Note: Paris has already been entered as a trusted site. You will see the
Remote Desktop Web Connection screen.
Complete the following 3 tasks a. Click the Paris link in the My Machines browser.
on: b. On the Paris computer, right-click the current time in the System Tray
and click Task Manager.
Paris c. In the Windows Task Manager dialog box, click Processes.
6. With the task manager, we d. Click to select the Show processes from all users check box.
can see exactly what IIS is e. In the Image Name column, select the w3wp.exe process.
using to host the Web page
viewed on the remote Info: In worker process isolation mode, the IIS process that handles the
machine, including the Web requests (in this case for the Remote Desktop Web Connection Web
account name for the worker page) is called w3wp.exe. In the default configuration, it runs as a low
process w3wp.exe. privileged account, named NETWORK SERVICE. This is a built-in account
that has fewer privileges than the Local System account, the default
account used in IIS 5.0 isolation mode.
f. Close Task Manager.
7. Now we will create a new a. In Internet Information Services (IIS) Manager, right-click Default
Web site to demonstrate the Web Site, point to New and click Virtual Directory.
default settings for a new b. On the Welcome to the Virtual Directory Creation Wizard screen,
IIS 6.0 installation. click Next.
c. On the Virtual Directory Alias screen, in the Alias text box, type
sampleweb and click Next.
d. On the Web Site Content Directory screen, click Browse.
e. In the Browse For Folder dialog box, expand Local Disk (C:), select
Inetpub and click Make New Folder.
f. In the New Folder text box, type sample and press Enter.
g. Click OK to close the Browse For Folder dialog box.
h. On the Web Site Content Directory screen, click Next.
i. On the Virtual Directory Access Permissions screen, ensure that
Read and Run scripts (such as ASP) are enabled and click Next.
j. On the You have successfully completed the Virtual Directory
Creation Wizard screen, click Finish.
8. Now we will create a simple a. In Internet Information Services (IIS) Manager, right-click
HTML page that will give
Internet Information Services 6.0 7

us a title and show the sampleweb and click Open.


Application Pool servicing The C:\Inetpub\sample folder opens in Windows Explorer.
the Web site.
b. In the C:\Inetpub\sample folder, right-click the empty space, point to
New and click Text Document.
c. In the New Text Document.txt text box, type Pool.htm and press
Enter.
d. Click Yes to confirm that you want to change the file name extension.
e. Right-click Pool.htm and click Edit.
Note: Pool.htm is opened in Notepad.
f. In Notepad, type the following three lines:
<H1>Sample Web page</H1>
The application pool is:
<% = Request.ServerVariables("APP_POOL_ID") %>
Note: The text between the <% and %> characters is Active Server Pages
(ASP) code to display the current application pool name.
g. Click File | Save.
h. Close Notepad.
Complete the following task a. Click the Madrid link in the My Machines browser.
on: b. In Internet Explorer, type http://paris/sampleweb/pool.htm in the
Address field and press Enter.
Madrid Note: The sample web page Pool.htm is displayed. Notice that the result of
9. Now we will view the Web the ASP code (<% ... %>) in the file is not displayed, because the file does
page we just created. not have the .asp extension.
Complete the following task a. Click the Paris link in the My Machines browser.
on: b. On the Paris computer, in the C:\Inetpub\sample folder, right-click
Pool.htm, and click Rename.
Paris
c. Type Pool.asp and press Enter.
10. Let’s make the HTML page
d. Click Yes to confirm that you want to change the file name extension.
into an ASP page so that we
can view the Application Info: The file name extension is changed from .htm (HTML Document) to
Pool ID. .asp (ASP File).
e. Close the C:\Inetpub\sample folder.
f. In the Internet Information Services (IIS) Manager console, right-
click sampleweb and click Explore.
Note: Pool.asp is displayed in the right pane.
Complete the following task a. Click the Madrid link in the My Machines browser.
on: b. In Internet Explorer, type http://paris/sampleweb/pool.asp in the
Address field and press Enter.
Madrid
Note: Internet Explorer reports that the page cannot be found. The
11. Now we navigate to the new
Pool.asp file is present on the Paris, but by default IIS 6.0 has disabled
Web page.
access to Active Server Pages (.asp) files.
Complete the following task a. Click the Paris link in the My Machines browser.
on: b. In Internet Information Services (IIS) Manager, select Web
Service Extensions in the left pane.
Paris
c. In the right pane, select Active Server Pages and click Allow.
12. Because ASP is disabled by
Note: The Active Server Pages status changes from Prohibited to Allowed.
default in IIS 6.0
installations, we need to
8 Internet Information Services 6.0

enable it to view the page.


Complete the following task a. Click the Madrid link in the My Machines browser.
on: b. In Internet Explorer, click Refresh.
Note: The content of the Pool.asp file is displayed correctly. The result of
Madrid
the ASP code (<% ... %>) appears as DefaultAppPool. That is the name of
13. We can now view the page.
the default application pool.
c. Close Internet Explorer.
Internet Information Services 6.0 9

Exercise 2
Application Pools, Worker Processes and Web Gardens

Scenario
In this exercise, you will examine the use of Application Pools, Worker Processes and Web
Gardens in IIS 6.0.
Application pools are used to isolate Web applications. One or more worker processes handle
requests for those applications. The number of worker processes, their identity and other worker
process parameters related to health monitoring, are configured per application pool.
Complete this Exercise using:

Paris

Madrid

Tasks Detailed steps

Complete the following 3 tasks a. Click the Paris link in the My Machines browser.
on: b. In Information Services (IIS) Manager, right-click Web Sites in the
left pane and click Properties.
Paris c. In the Web Sites Properties dialog box, click Service.
1. To begin, we will look at d. In the Web Sites Properties dialog box, click Help.
two diagrams explaining the e. In the Internet Information Services (IIS) 6.0 help window, scroll to
differences between worker the Related Topics section at the end of the text and click Isolation
process isolation mode and Modes.
IIS 5.0 isolation mode in
The Internet Information Services 6.0 Administrator Guide opens on the IIS
IIS 6.0.
Isolation Modes page.
f. Close the small Internet Information Services (IIS) 6.0 help window
that stayed on top.
g. In the Internet Information Services 6.0 Administrator Guide, click
in the right pane, and scroll down the IIS 5.0 Isolation Modes text to
see the two diagrams that show the fundamentally different architecture
between worker process isolation mode and IIS 5.0 isolation mode.
Info: In both modes, for performance reasons, the HTTP listener (http.sys)
runs in kernel mode. It stores responses in a kernel-mode cache. In worker
process isolation mode, IIS 6.0 runs multiple Web applications in isolated
environments, called application pools. Worker processes (w3wp.exe)
assigned to the application pool handle the Web requests for each
application. In a separate process (svchost.exe), the WWW Service only
manages and monitors all the worker processes. In IIS 5.0 isolation mode,
the HTTP listener sends Web requests to the WWW Service, which are then
handled in-process (inetinfo.exe) or out-of-process (dllhost.exe).
h. Close the Internet Information Services 6.0 Administrator Guide.
Info: You can open the IIS 6.0 Administrator Guide on any Windows
10 Internet Information Services 6.0

Server 2003 computer, by typing hh iismmc.chm in the Run dialog box.


i. Click Cancel to close the Web Sites Properties dialog box.
2. We can easily create a new a. In Internet Information Services (IIS) Manager, expand
application pool named Application Pools.
Sample Pool to use with our b. Right-click Application Pools, point to New and click Application
Web application. Pool.
c. In the Add New Application Pool dialog box, type Sample Pool in the
Application pool ID text box and click OK.
3. Now that we have a new a. Under Default Web Site, click sampleweb, right-click sampleweb
application pool for and click Properties.
servicing Web applications, b. In the sampleweb Properties dialog box, click Virtual Directory,
we will move the select Sample Pool in the Application pool dropdown box and click
sampleweb application to OK.
this new application pool. c. In the left pane, expand Sample Pool.
Note: The sampleweb application is still part of the Default Web Site (and
communicates on port 80, the default for the Default Web Site). However,
worker processes in the Sample Pool application pool now handle Web
requests for sampleweb.
Complete the following task a. Click the Madrid link in the My Machines browser.
on: b. In Internet Explorer, type http://paris/sampleweb/pool.asp in the
Address field and press Enter.
Madrid Note: The contents of the Pool.asp file shows that the application is in the
4. We will now connect to Sample Pool application pool.
both Web sites currently
c. Click Start | All Programs and click Internet Explorer to open a
hosted on the Paris server. second instance of the Web browser.
d. In the second Internet Explorer, type http://paris/tsweb in the
Address field and press Enter.
Note: Internet Explorer displays the Remote Desktop Web Connection Web
page. This request is still handled by the default application pool. Please
leave both Internet Explorer windows open for use in the next tasks
Complete the following 4 tasks a. Click the Paris link in the My Machines browser.
on: b. Click Start | Command Prompt.
c. Type cscript.exe %windir%\system32\iisapp.vbs and press Enter.
Paris
Info: The iisapp.vbs script lists the process IDs (PID) for all the current
5. Since we have live worker processes (w3wp.exe), and the associated application pool name
connections to both web (AppPoolId). (The System32 folder contains eight iis*.vbs scripts to
sites, we can view the administer IIS 6.0.)
processes that are hosting
Note: The output of iisapp.vbs shows that two worker processes are
them.
started. One for sampleweb in Sample Pool, and one for tsweb in
DefaultAppPool.
6. Now we will create a Web a. Switch to Internet Information Services (IIS) Manager, click tsweb
application for the TS Web under Default Web Site, right-click tsweb and click Properties.
site so that we can move it b. In the tsweb Properties dialog box, click Virtual Directory, click
into our new application Create and type TS Web in the Application name text box.
pool. c. In the Application pool dropdown box, select Sample Pool and click
OK.
Note: We have created new application named TS Web for the tsweb
virtual directory and moved it to the Sample Pool application pool.
7. We must stop and start the a. Under Application Pools, right-click DefaultAppPool and click
Internet Information Services 6.0 11

DefaultAppPool Properties.
application pool to shut b. In the DefaultAppPool Properties dialog box, click Performance.
down the current worker
Info: The Idle timeout setting shows that worker processes are shut down
process in this application
after being idle for 20 minutes. That is the default setting for
pool.
DefaultAppPool and other application pools.
c. Click Cancel to close the DefaultAppPool Properties dialog box.
Note: Instead of waiting 20 minutes, we stop and start the DefaultAppPool
to shut down the current worker process in this application pool.
d. Right-click DefaultAppPool and click Stop.
Info: Do NOT click Recycle. That command restarts worker processes. It is
not the combination of Stop and Start for the application pool.
e. Right-click DefaultAppPool and click Start.
8. Again, we will view the a. Switch to the Command Prompt window, type cscript.exe
current worker processes %windir%\system32\iisapp.vbs and press Enter.
used by IIS 6.0. Note: The output of iisapp.vbs shows that only the worker processes in
Sample Pool is started. (If worker processes do not return refresh the
pages on Madrid and run command prompt again.)
Complete the following task a. Click the Madrid link in the My Machines browser.
on: b. In the Internet Explorer window that displays the contents of
http://paris/sampleweb/pool.asp click Refresh.
Madrid c. In the Internet Explorer window that displays the contents of
9. We need to refresh our http://paris/tsweb, click Refresh.
browser instances to Note: Internet Explorer connects to IIS on Paris to refresh the contents of
reconnect to IIS on Paris both Web pages.
and start the appropriate
worker processes.
Complete the following task a. Click the Paris link in the My Machines browser.
on: b. In the Command Prompt window, type cscript.exe
%windir%\system32\iisapp.vbs and press Enter.
Paris Note: The output of iisapp.vbs shows that a single worker processes in
10. Let’s list the current worker Sample Pool responded to the requests for sampleweb and for tsweb.
processes.
11. Now we will set up another a. In Internet Information Services (IIS) Manager, right-click Sample
new feature of IIS 6.0. We Pool and click Properties.
use IIS Manager to b. In the Sample Pool Properties dialog box, click Performance and set
configure the Sample Pool the Maximum number of worker processes to 2 in the Web garden
application pool to be a Web section.
garden with two worker Info: By default a single worker process handles the request in an
processes. application pool. You can configure an application pool to have more than
one worker process. An application pool that uses more than one worker
process is called a Web garden. This is an analogy to a Web farm that uses
more than one server for a Web site.
c. Click OK to close the Sample Pool Properties dialog box.
Complete the following task a. Click the Madrid link in the My Machines browser.
on: b. In the Internet Explorer window that displays the contents of
http://paris/sampleweb/pool.asp, click Refresh.
Madrid c. In the Internet Explorer window that displays the contents of
12. We need to refresh our http://paris/tsweb, click Refresh.
browser instances to
reconnect to IIS on Paris
12 Internet Information Services 6.0

and start the appropriate


worker processes.
Complete the following 6 tasks a. Click the Paris link in the My Machines browser.
on: b. In the Command Prompt window, type cscript.exe
%windir%\system32\iisapp.vbs and press Enter.
Paris Note: The output of iisapp.vbs shows that two worker processes in Sample
13. Let’s list the current worker Pool responded to the requests. One for sampleweb and one for tsweb.
processes to see how the Remember the two process IDs (PID) of the current worker processes for
Web garden functions. use in the next task.
14. Use IIS Manager to recycle a. In Internet Information Services (IIS) Manager, right-click Sample
the worker processes in the Pool and click Recycle.
Sample Pool application Note: IIS starts two new worker processes in Sample Pool and shuts down
pool. the existing two worker processes. The mechanism ensures that faulty Web
applications will not use up all system resources.
Info: Web requests continue to be serviced during the recycle period,
because an overlapped recycle is done. The existing worker processes keep
running, until after the new worker process is started up. Also, TCP/IP
connections from the Web browser on the client computers are maintained
by the WWW service, not by the individual worker processes.
15. Let’s list the current worker a. In the Command Prompt window, type cscript.exe
processes. %windir%\system32\iisapp.vbs, and press Enter.
Note: The output of iisapp.vbs shows that Sample Pool now has two
worker processes with other process IDs (PID) than before. This indicates
that these are two new processes.
16. Use IIS Manager to a. In Internet Information Services (IIS) Manager, right-click Sample
examine automatic Pool and click Properties.
recycling options for an b. In the Sample Pool Properties dialog box, ensure that the Recycling
application pool. tab is selected.
Info: Instead of manually starting the Recycle action, an application pool
can be configured to automatically recycle its worker processes based on
elapsed time, number of request, time of day and memory usage.
c. Click Cancel to close the Sample Pool Properties dialog box.
17. In the next tasks, we will a. In Internet Information Services (IIS) Manager, right-click
configure the process Application Pools, point to New and click Application Pool.
identity of the worker b. In the Add New Application Pool dialog box, type TS Pool in the
processes. We will start by Application pool ID text box, and click OK.
creating a new application c. Under Default Web Site, right-click tsweb and click Properties.
pool and moving the TS
d. In the tsweb Properties dialog box, click Virtual Directory, select TS
Web application into it. Pool in the Application pool dropdown box and click OK.
The TS Web application is moved to the new TS Pool application pool.
e. In the left pane, expand TS Pool.
18. Now we configure the TS a. In the left pane, right-click TS Pool and click Properties.
Pool to use the Local b. In the TS Pool Properties dialog box, click the Identity tab and select
Service account identity. Local Service in the Predefined list box.
Info: The application pool identity is the user account that the worker
processes run under. All actions taken by the worker process are performed
with the privileges of this user account.The default identity for application
pools is Network Service. This is a built-in account in Windows Server
2003 that has the same privileges as a normal user account. Another new
built-in account, Local Service, is similar to Network Service, but has no
Internet Information Services 6.0 13

network access.
c. Click OK to close the TS Pool Properties dialog box.
Complete the following task a. Click the Madrid link in the My Machines browser.
on: b. In the Internet Explorer window that displays the contents of
http://paris/sampleweb/pool.asp, click Refresh.
Madrid c. In the Internet Explorer window that displays the contents of
19. We need to refresh our http://paris/tsweb, click Refresh.
browser instances to
reconnect to IIS on Paris
and start the appropriate
worker processes.
Complete the following 3 tasks a. Click the Paris link in the My Machines browser.
on: b. In the Command Prompt window, type cscript.exe
%windir%\system32\iisapp.vbs and press Enter.
Paris c. Remember the process ID (PID) for the AppPoolId for TS Pool for
20. Now we can use the use in the next task.
iisapp.vbs command to d. Close the Command Prompt window.
determine the process ID
(PID) of the worker process
in the TS Pool.
21. We use Task Manager to a. Right-click the current time in the System Tray and click Task
verify the process identity of Manager.
the worker process in the TS b. In the Windows Task Manager dialog box, click View and click
Pool application pool. Select Columns.
c. In the Select Columns dialog box, click to select the PID (Process
Identifier) check box and click OK.
d. On the Processes tab, select the worker process (w3wp.exe) with the
PID corresponding to the AppPoolId for the TS Pool that the
iisapp.vbs command displayed in the previous task.
Note: Task Manager shows that the worker process in the TS Pool
application pool run under the LOCAL SERVICE account. The other
worker processes (w3wp.exe) in the process list runs under the Network
Service account.
e. Close Task Manager.
22. To see what permissions are a. In Internet Information Services (IIS) Manager, right-click TS
set on a Web site, use IIS Pool and click Properties.
Manager to examine the b. In the TS Pool Properties dialog box, click the Identity tab.
default permissions of the
IIS_WPG group. Info: Instead of using one of the three predefined accounts, you can
configure the application pool identity to use a custom (configurable) user
account. When you configure a custom user account, also add the account
to the IIS_WPG group. The IIS_WPG group provides the minimum set of
rights and permissions required to run as worker process and to run Web
applications. An example of a custom user account that can be used as
application pool identity is the IWAM_PARIS user account.
c. Click Cancel to close the TS Pool Properties dialog box.
d. In the left pane, right-click Default Web Site and click Permissions.
Note: A dialog box appears, containing the Security tab for the NTFS
permissions of the c:\inetpub\wwwroot folder.
e. In the c:\inetpub\wwwroot dialog box, select the IIS_WPG group.
Note: By default the IIS_WPG group has Read & Execute, List Folder
14 Internet Information Services 6.0

Contents and Read permissions on the Default Web Site folder.


f. Click Advanced.
Info: When a worker process is processing a client request, it uses
impersonation. It creates a thread that uses the authenticated user's
identity, or that uses the IUSR_PARIS (IUSR_machinename) account if the
client request is anonymous.
g. In the Advanced Security Settings for wwwroot dialog box, ensure
that Internet Guest Account (CONTOSO\IUSR_PARIS) is
selected and click Edit.
Info: In the Permission Entry for wwwroot dialog box, notice that
anonymous Web requests (impersonated as IUSR_PARIS) are explicitly
denied permissions to Create Files / Write Data, Create Folders / Append
Data, Write Attributes, Write Extended Attributes, Delete Subfolders and
Files and Delete on the Default Web Site.
h. Click Cancel to close the Permission Entry for wwwroot dialog
box.
i. Click Cancel to close the Advanced Security Settings for wwwroot
dialog box.
j. Click Cancel to close the c:\inetpub\wwwroot dialog box.
Internet Information Services 6.0 15

Exercise 3
XML MetaBase

Scenario
In this exercise, you will back up the IIS 6.0 metabase files and edit the contents of the
XML-formatted metabase file, while IIS is running.
Complete this Exercise using:

Paris

Tasks Detailed steps

1. First we will use IIS a. In Internet Information Services (IIS) Manager console, right-click
Manager to save the current Paris (local computer), point to All Tasks and click Save
metabase changes to disk. Configuration to Disk.
b. Click OK to confirm that the configuration changes have been saved.
Info: When IIS starts up, it reads all the configuration information for all
its Web sites and application pools from a file on the hard disk. This is
called the metabase. While running, IIS keeps this configuration
information in memory, and periodically saves configuration changes to
the metabase file. You can save the current configuration changes to the
metabase immediately by running the Save Configuration to Disk
command.
2. By browsing to the proper a. Click Start | Windows Explorer.
directory, we can identify b. Browse to C:\WINDOWS\system32\inetsrv.
the metabase files and the
Info: The two files MBSchema.xml and MetaBase.xml in the inetsrv folder
backup and history versions
form the metabase. MBSchema.xml contains the metabase schema
of the metabase files.
information. MetaBase.xml contains the actual IIS configuration
information. IIS 4.0 and IIS 5.0 used a binary file named Metabase.bin to
store the schema and configuration information. IIS 6.0 uses two plain text
XML-formatted files.
c. Browse to C:\WINDOWS\system32\inetsrv\History.
d. Expand the Name column.
Info: By default, IIS saves copies of the last 10 versions of the
MBSchema.xml and MetaBase.xml files. The file names include increasing
version numbers of the form Name_major#_minor#.xml. The major version
number increases when IIS saves a new copy of the metabase. The minor
version number increases when the administrator manually edits the
metabase.xml file.
e. Browse to C:\WINDOWS\system32\inetsrv\MetaBack.
Info: This is the default location to store backups of the metabase.
3. Now we will use the IIS a. In Internet Information Services (IIS) Manager, right-click Paris
Manager to backup the (local computer) point to All Tasks and click Backup/Restore
current metabase. Configuration.
Info: The Configuration Backup/Restore dialog box lists the current
16 Internet Information Services 6.0

metabase backups from the MetaBack folder, plus the 10 automatic


backups from the History folder.
b. In the Configuration Backup/Restore dialog box, click Create
Backup.
c. In the Configuration Backup dialog box, type Lab Backup in the
Configuration backup name text box.
Info: If you specify a password, the secure properties in the backup file are
encrypted. All other information in the backup remains unencrypted.
d. Click OK to close the Configuration Backup dialog box.
Info: IIS creates a backup of the metabase files, and stores the backup in
the MetaBack folder. (The backup version number is used to distinguish
backup sets with the same name.)
e. Click Close to close the Configuration Backup/Restore dialog box.
Info: You can restore metabase backups on the same computer, or if
needed, on another computer.
4. IIS 6.0 allows us to edit the a. In Internet Information Services (IIS) Manager, right-click Paris
metabase live and it updates (local computer) and click Properties.
the configuration while still b. In the Paris (local computer) Properties dialog box, click to select the
running. We use IIS Enable Direct Metabase Edit check box.
Manager to enable this Info: Even though IIS keeps a copy of the metabase content in memory, this
feature. option allows us to edit the metabase.xml file while IIS is running (not the
MBSchema.xml file). IIS uses Windows file change notification to update its
configuration in memory, when the metabase.xml file is changed manually.
c. Click OK to close the Paris (local computer) Properties dialog box.
5. First let’s look at the last a. Switch to Windows Explorer and browse to the
copy of the metabase so that C:\WINDOWS\system32\inetsrv\History folder.
we can see that it was Note: The last saved copy of the metabase files is from less than a minute
recently changed, when we ago.
allowed direct editing.
Info: The option to allow editing the metabase directly while IIS is
running, is itself a change in the configuration and causes IIS to
immediately update the metabase file on the hard disk.
6. Now all we need to edit the a. In the C:\WINDOWS\system32\inetsrv folder, right-click
metabase is Notepad. MetaBase.xml and click Edit.
b. In the IIsComputer node, change the value of MaxHistoryFiles to
"12". (On line ~20 in the file.)
Info: The value of the MaxHistoryFiles property indicates how many saved
metabase history versions IIS must keep in the History folder.
c. Click File | Save.
d. Close Notepad.
7. Now we can see that the edit a. In Windows Explorer browse to
we made was implemented C:\WINDOWS\system32\inetsrv\History folder.
because IIS created a copy Note: The last saved copy of the metabase files only increased the minor
of the metabase. version number in the file names (Name_major#_minor#.xml) to indicate
that the metabase.xml file was edited directly.
8. Let’s look at the schematic a. Click Start | Run.
structure of the metabase b. In the Run dialog box, type hh iismmc.chm and click OK.
file.
c. In the Internet Information Services 6.0 Administrator Guide, on
the Contents tab, expand Internet Information Services | Server
Administration Guide | IIS Metabase | Metabase Structure and
Internet Information Services 6.0 17

select Metabase Configuration File.


Info: In the right pane, the Metabase Configuration File page provides a
good description of the structure of the metabase.xml file.
d. In the left pane, right-click Metabase Configuration File (or any other
node), and click Close all.
e. Expand Internet Information Services | Reference | Metabase
Property Reference and select MaxHistoryFiles.
Info: The Metabase Property Reference node contains a list of all the
properties in the metabase.xml file. The MaxHistoryFiles property was
changed in the previous task.
f. Close the Internet Information Services 6.0 Administrator Guide.
9. Now we will see what a. In the C:\WINDOWS\system32\inetsrv folder, right-click
happens if we “accidentally” MetaBase.xml and click Edit.
make an incorrect entry to Note: A disadvantage of using a generic text editor like Notepad, to
the metabase file. change the contents of a critical configuration file like metabase.xml, is the
possibility of making editing mistakes.
b. In the IIsComputer node, "accidentally" remove the = (equal) sign
after MaxBandwidth. (On line ~20 in the file.)
Note: This editing change makes this an incorrect metabase.xml file.
c. Click File | Save.
d. Close Notepad.
10. We examine the System log a. Click Start | Administrative Tools and click Event Viewer.
in Event Viewer to b. In Event Viewer, select the System log in the left pane.
determine how IIS handles
c. In the right pane, right-click the error event from IIS Config with event
an editing error in the ID 4275 and click Properties.
metabase.xml file.
Note: The description of the error event states that the XML parser found
an invalid character on row (line) 19.
d. In the Error Properties dialog box for event ID 4275, click the Up
arrow button.
Note: The description of the next error event (event ID 51220) states that
the new metabase file was not applied.
k. In the Error Properties dialog box for event ID 51220, click the Up
arrow button.
Note: The description of the next error event (event ID 51219) states that
the incorrect metabase file is copied to the History folder. The
metabase.xml file is replaced by the last-known-good configuration.
l. Click OK to close the Error Properties dialog box.
m. Close Event Viewer.
11. We can see how IIS handled a. In the C:\WINDOWS\system32\inetsrv folder, right-click
the error we introduced by MetaBase.xml and click Edit.
viewing the current contents Note: The = (equal) sign after the MaxBandwidth property on line 19, is
of the metabase.xml file. still in the file.
b. Close Notepad.
12. Further, we can find the a. In Windows Explorer, browse to
error file to identify the C:\WINDOWS\system32\inetsrv\History folder.
incorrect metabase.xml file. Note: The folder contains a MetaBaseError_#.xml file. This is the
incorrect metabase.xml file, with the missing = (equal) sign.
18 Internet Information Services 6.0

b. Right-click MetaBaseError_#.xml and click Edit.


c. On line 19, the = (equals) sign is not there.
d. Close all open windows.

Das könnte Ihnen auch gefallen