World Wide Web Service

HTTP Keep Alives

Each connection that an IIS service consumes some processor time. Each time the connection is established, the load on the server is increased. One of the IIS feature to optimize its handling of connections is HTTP Keep-Alives. HTTP Keep-Alives maintains a connection even after the connection's initial request is completed. This feature keeps the connection active and available for subsequent requests. HTTP Keep-Alives are enabled in IIS by default. Although HTTP Keep-Alives significantly improves bandwidth performance on most servers, you can modify or eliminate them if they are not needed.

Disable HTTP Keep-Alives if you would like to reduce the number of inactive sessions without changing the timeout value or the maximum number of concurrent sessions.


Permission

Managers have access to a special directory. Mary is promoted to manager, but she can not access the directory. Mary has the same permissions as Bill, who can access the directory. What do you need to do so that Mary has access?

What permission(s) must be given to virtual directories containing IMAGES.GIF/JPEG

You have two domains, Domain A and Domain B and you want to be able to access computers on Domain B by using the computer name. Establish a trust relationship where Domain B trust Domain A. Make sure both domains are using the same WINS server. If each domain has their own WINS  servers then make sure both WINS have Push/Pull replication to each other. Make sure the Domain A\Administrator is a member of Domain B\Administrators.


Virtual Web Sites

If you would like to configure web sites to use simple names (instead of FQDN), use WINS or LMHOSTS files. DNS can be used too if the setting Use DNS for Windows Resolution" has been selected on the TCP/IP properties.

There are 3 ways of hosting virtual servers:

a) assign unique IP addresses for every virtual domain
b) use Host Headers (WWW only)
c) assign unique port numbers

In a small intranet, there must be an entry for the Host Header in the HOST file. This file must be copied to all clients in the intranet. In the Internet or bigger intranet, there must be a Host Header entry in the DNS server. All clients must have the DNS server IP address.

The Host Header entry must be configured on the second web site. If not, when users try to go to the second web site they will open up the first one.

Some older browser does not recognize spaces in the URL. "White Horse" must be renamed as "Whitehorse".


IP Blocking

By default, all computers are granted access to a  web site. Certain computer (if the IP address is known) can be blocked from accessing the web site. If only a single IP needs to be blocked, the subnet mask will not be needed. If you need to block a range of IP then you need to define the subnet mask. Please refer to the TCP/IP course on how to do this.

You can also deny access access to all computers and only grant permission to certain computers to access. For example, you need to allow IP addresses 192.168.0.96 - 192.168.0.127 to access. The subnet mask needed will be 255.255.255.224.


MIME

Multipurpose Internet Mail Extension (MIME) is a standard that allows binary data to be published and read on the Internet. The header of a file with binary data contains the MIME type of the data; this informs client programs (Web browsers and mail packages, for instance) that they will need to handle the data some way other than they handle straight text. For example, the header of a Web document containing a JPEG graphic contains the MIME type specific to the JPEG file format. This allows a browser to display the file with its JPEG viewer, if one is present.

Each MIME format includes a MIME content type ("MIME type") and subtype which denote the kind of data stored in the file. MIME types and subtypes are typically listed as type/subtype. For example, an MPEG video file would be listed as "video/mpeg." When a user viewing the page clicks on the MPEG-file link, Internet Information Services (IIS) and the Microsoft® Internet Explorer browser perform the following sequence of events when downloading the MPEG file to the browser for display:

  1. Along with the file, IIS sends the MIME type and subtype (video/mpeg, video/mpe, or video/mpg) to the browser.
  2. If support for the MPEG MIME format is built-in, the browser displays the file.
  3. If the browser does not contain built-in support for the MIME format, the browser looks up the file name extension in its table of helper applications. Then it either selects the appropriate helper application to display the file or returns an error message.

Examples:

a) users want to open files with extension .HTMH with IE
b) users want to open files with extension .stm with IE

The mappings are kept in the Registry under HKEY_LOCAL_MACHINE\SOFTWARE\Classes\MIME\Databases\Content Type. They can be edited directly using REGEDIT or REGEDT32. Entries can also be added through the HTTP Headers tab of any web site directory.


Performance

Your web site experience high latency (meaning, not showing sign of existence). You would like to prevent WAN users from being disconnected from your web site. By increasing the Connection Timeout, it takes longer time for the server to disconnect an active user.


Logging

You can configure your Web or FTP sites to log information about user activity. You can find out which users accessed your sites and what information they accessed. Logged data can help you regulate access to content, plan user accessibility, assess content popularity, and plan security requirements. You can also use logs to detect and troubleshoot potential Web site or FTP site problems.

IIS can log server activity in the following formats:

The logs created by IIS can be read in a text editor or, for ODBC logging, viewed in a database; they can also be examined by using Microsoft Usage Import and Report Writer . Logging using SQL (ODBC) will be slower.


Errors

Some of the normal errors are:

Code Description
401 Unauthorized - Logon failed due to server config, ACL, filter or ISAPI/CGI.
403 Forbidden - Execute/Read/Write forbidden, SSL required, IP rejected, Client cert required, Site Access denied, etc.
404 File not found, Virtual Directory have got space in the name.
500 Internal Server Error - Anonymous does not have log on rights.
502 Bad Gateway - incorrect DSN when accessing SQL.

You can create your own friendly custom error messages. At the Custom Error tab of the Web Site, just add the URL or path to an HTML document that contain the error you have created.