Although the default settings for IIS allow you to quickly and safely publish documents on your Web site, you may have special needs that require changing some of the defaults. For instance, the default setting is to have a home page that displays links to other documents on your site. However, if you have a large number of documents to share, and the documents are to remain in their native formats, you may find that directory browsing is a faster and more efficient way for users to reach your documents.
This topic defines and discusses the following:
A default document is the document, usually in HTML format, that the server presents to site visitors who have not specified a file name in their request. If you type http://www.microsoft.com/ in the address field of your browser, you reach the Microsoft home page, even though you didnt type a file name. That is because the Web server responds with a default document (the Microsoft home page) for all requests that do not include a file name.
What happens if visitors add a subdirectory under the home directory to their request, but still fail to add a file name? If you type http://www.microsoft.com/iis/ in your browser, you reach the default page specified for the Internet Information Services subdirectory of the Microsoft home directory. By placing a default page in every publishing directory, you can assure that visitors find a home page on your site, regardless of the path they type to get there.
IIS supports the use of multiple default document names. When a request without a file name arrives, IIS searches for the first default document name. If it does not find a document with the first name in the directory specified in the request, it checks for the second default document name, and so on until it finds a file or runs out of names. This means you can have a default document with one file name in one place in your directory structure, and another default document with a different file name in another place in your directory structure. Alternately, you can use the same file name in each directory, but make the content different depending on the directory the file resides in.
The default document can have any name you want, provided it is a file name supported by the operating system. Names must be composed of letters and numbers, but cannot contain spaces. The most common names are Default.htm and Index.htm. You can also have different file name extensions, the three letters following the period in the file name. For instance, if you have a Microsoft® Active Server Pages script in your home page, you must use the .asp extension, so the server correctly processes the script. In this case, your home page might be called Default.asp, or Index.asp. For more information about creating and using Active Server Pages scripts, see Active Server Pages. To change the name of the default document used by IIS, see Changing the Default Home Page.
If you choose not to use a default document, visitors can still reach your site by typing the file name they are requesting at the end of your site address. To do this, the visitor must know the exact file name in advance.
Directory browsing is an easy alternative way of navigating to documents on a Web site. If you disable the automatic use of default documents, and enable directory browsing, visitors view a list of all files in the directory specified in their request. IIS automatically generates and formats the list displayed. On sites that include many documents in non-HTML formats, or sites where documents are constantly being added or removed, this is a fast, low-maintenance way of presenting the documents in the directory for visitor access. When a visitor clicks on a file name, the content of the document is displayed (assuming the visitor has a program compatible with the file format of the document). For information on how to enable directory browsing, see Enabling Directory Browsing.
The simplest form of Web site security is to maintain a log of the computers that contact your site. The log is a record of who visited your site, when they visited, and what they looked at. By checking your logs, you can find out how people are using your site, and make sure that no one is misusing it.
Logs are written in the NCSA log file format and can be viewed in any text editor. New files are created daily and placed in the Log File/W3SPC1 directory of your Windows System folder. The file names begin with Nc and are followed by the year and month as numbers. For example, a log file made in August of 1997 would be named Nc9708.log. For instructions on enabling logging, see Logging Site Activity.
The amount and kind of activity on your site can affect both the performance of your site, and also of other applications running on your computer. To help you monitor performance and find potential bottlenecks and problems, IIS includes a site monitoring graph. The graph includes a number of different ways of viewing site statistics. For more information on the performance measures available, see Viewing Site Performance.
Web site performance can be affected by a number of different factors including:
Most browsers are capable of maintaining four or more simultaneous connections to your site. The Windows 2000 Professional version of IIS has a 10-connection limit. This means that your site can comfortably support two or three users simultaneously.
If you have a slow network connection, files take longer to reach your visitor. Each graphic in an HTML page is a separate file and each requires its own connection to be transferred to the browser. If your files are large, or your HTML pages contain a large number of graphics, the visitor must wait for your page to load. Keep graphics to a minimum and make them relatively small to make the transfer of your pages more efficient, and you are less likely to lose visitors because they became impatient and gave up.