Home | | Internet & World Wide Web HOW TO PROGRAM | | Internet Programming | | Web Programming | Microsoft Internet Information Services (IIS)

Chapter: Internet & World Wide Web HOW TO PROGRAM - Rich Internet Application Server Technologies - Web Servers (IIS and Apache)

Study Material, Lecturing Notes, Assignment, Reference, Wiki description explanation, brief detail

Microsoft Internet Information Services (IIS)

Microsoft Internet Information Services (IIS) is a web server that is included with several versions of Windows.

Microsoft Internet Information Services (IIS)

 

Microsoft Internet Information Services (IIS) is a web server that is included with several versions of Windows. Installing IIS enables a computer to serve documents. To install IIS 5.1 on Windows XP Professional, open the Add or Remove Programs control panel, click Add/Remove Windows Components, check the checkbox next to Internet Information Services (IIS), and click Next >. You may need the original operating system disk to complete the installation. For IIS 6.0 on Windows Server 2003 and IIS 7.0 on Windows Vista, the software should already be installed (but is also on your installation disk). The remainder of this section assumes that either IIS 5.1, IIS 6.0 or IIS 7.0 is installed on your system. In Windows Server 2003, you’ll need to use the Manager Your Server window to add the Ap-plication Server role. In Windows Vista, go to the Control Panel, select Programs, then select Turn Windows Features On or Off.

 

The following subsections explain how to configure IIS 5.1, IIS 6.0 and IIS 7.0 to serve documents via HTTP. If you are using Windows XP or Windows Server 2003, see Section 21.6.1. If you are using Windows Vista, skip to Section 21.6.2.

 

1. Microsoft Internet Information Services (IIS) 5.1 and 6.0

 

Start the Internet services manager by clicking the Start button and opening the Control Panel. If the Control Panel is currently in Category View, click Switch to Classic View. Then, double click the Administrative Tools icon and double click the Internet Services Manager icon (Internet Information Services (IIS) Manager in Windows Server 2003). For Windows XP, this opens the Internet Information Services window (Fig. 21.4)—the administration.


program for IIS 5.1. For Windows Server 2003, this opens the (Internet Information Ser-vices (IIS) Manager, which provides the same capabilities. Alternatively, you can type inetmgr at the Start menu’s Run... command prompt to open this window. You place doc-uments that will be requested from IIS either in the website’s default directory (i.e., C:\Inetpub\wwwroot) or in a virtual directory. A virtual directory is an alias for an existing directory that resides on the local machine (e.g., C:\) or on the network. When a server is accessed from a web browser, content in the default directory and virtual directories is vis-ible to the client.

 

In the window, the left pane contains the web server’s directory structure. The name of the machine running IIS (e.g., RESILIANT) is listed under Internet Information Services. Clicking the + symbol to the left of the machine name displays Default Web Site (and pos-sibly several other nodes).

 

Expand the Default Web Site directory by clicking the + to the left of it. In this direc-tory, we will create a virtual directory for the website. Most web documents are placed in the web server’s wwwroot directory or one of its subdirectories. For this example, we create a directory in the wwwroot directory and have our virtual directory point to it. To create a virtual directory in this directory, right click Default Web Site and select New > Virtual Directory…. This starts the Virtual Directory Creation Wizard (Fig. 21.5), which guides you through creating a virtual directory.


To begin, click Next > in the Virtual Directory Creation Wizard welcome page. In the Virtual Directory Alias page (Fig. 21.6), enter a name for the virtual directory and click Next >. We use the name Chapter21Test, although the virtual directory may have any name, provided that it does not conflict with an existing virtual directory name.

 

In the Web Site Content Directory page (Fig. 21.7), enter the path for the directory containing the documents that clients will view. We created a directory named C:\Chapter21Examples that serves our documents. You can select the Browse button to navigate to the desired directory or to create a new one. Click Next >.

 

The Access Permissions page (Fig. 21.8) presents the virtual directory security level choices. Choose the access level appropriate for a web document. The Read option allows users to read and download files located in the directory. The Run scripts (such as ASP)




option allows scripts to run in the directory. The Execute (such as ISAPI applications or CGI) option allows applications to run in the directory. The Write option allows a web page to write to files on the server, which could be a security risk. The Browse option allows users to see a full list of the folder’s files through a web browser. By default, Read and Run scripts are enabled. Click Next >.

 

Click Finish to complete the creation of the virtual directory and exit the Virtual Direc-tory Creation Wizard. The newly created virtual directory, Chapter21Test, is now part of the Default Web Site. The IIS server is configured to serve documents through the Chapter21Test virtual directory. The URL  http://localhost/Chapter21Test now ref-erences the C:\Chapter21Examples directory.

 

To start IIS so it can serve content, right click Default Web Site and select Start. If you need to stop IIS, right click Default Web Site and select Stop. The web server is not avail-able to serve content if it is stopped.

 

2. Microsoft Internet Information Services (IIS) 7.0

 

To start the Internet Information Services (IIS) Manager, click the start () button, se-lect the Control Panel, click Classic View, double click the Administrative Tools icon and double click the Internet Information Services (IIS) Manager icon. Click Continue in the di-alog that appears to display the Internet Information Services (IIS) Manager window (Fig. 21.9)—the administration program for IIS 7.0. You place documents that will be re-quested from IIS either in the default directory (i.e., C:\Inetpub\wwwroot) or in a virtual directory. A virtual directory is an alias for an existing directory that resides on the local machine (e.g., C:\) or on the network. When a server is accessed from a browser, only the default directory and virtual directories are visible to the client.

 

In the Internet Information Services (IIS) Manager window, the left pane contains the web server’s directory structure. The name of the machine running IIS (e.g., QUALIFLY) is listed at the top of the Connections column. Clicking the arrow (  ) symbol to the left of the machine name displays Application Pools and Web Sites. The Application Pools folder contains tools for configuring advanced features of IIS 7.0.


Expand Web Sites by clicking the arrow (  ) to the left of it. This should display Default Web Site. Expand Default Web Site by clicking the arrow (  ) to the left of it. These are the folders and virtual directories in the default website. For this example, we create a virtual directory from which we request our documents. To create a virtual directory, right click Default Web Site and select Add Virtual Directory…. This displays the Add Virtual Directory dialog (Fig. 21.10). In the Alias: field, enter a name for the virtual directory. We use the name Chapter21Test, although the virtual directory may have any name, provided that it does not conflict with an existing virtual directory. In the Physical path: field, enter the path for the directory containing the documents that clients will view. We created a directory named C:\Chapter21Examples for our documents. If necessary, select the button to navigate to the desired directory or to create a new one. Click OK to create the new virtual directory.

 

In Windows Vista, before you can use IIS, you must enable the World Wide Web Publishing Service (W3SVC). To do so, go to the start  button, select Control Panel, select Classic View, double click Administrative Tools and double click Services. This dis-plays the Services window. Locate World Wide Web Publishing Service in the list of ser-vices, then right click it and select Properties. In the window that appears, change the Startup type: option to Automatic, then click OK. Next, right click World Wide Web Pub-lishing Service again and select Start to run IIS so that it can accept requests.




Study Material, Lecturing Notes, Assignment, Reference, Wiki description explanation, brief detail


Copyright © 2018-2020 BrainKart.com; All Rights Reserved. Developed by Therithal info, Chennai.