ISAPI and the Web Application Architecture

Microsoft® developed the ISAPI model as an alternative to the Common Gateway Interface (CGI). The ISAPI model provides a number of advantages over the CGI model, including low overhead, fast loading, and better scalability.

A detailed comparison of the two models is provided in ISAPI and CGI.

You can assemble ISAPI extensions into Web applications that provide all of the functionality of an application running on your desktop. You can also create ISAPI filters to customize the functionality of IIS. Filters provide a slightly different processing model than extensions. An extension is activated upon request by a client, whereas a filter is activated by IIS directly when a particular request event occurs. Extensions are request-driven, filters are processing event-driven.

IIS builds on the concept of a namespace to identify applications. A namespace can be defined as a way of associating a protocol and network service addressing scheme with a human-friendly name. The IIS application architecture extends the concept of a namespace by enabling the creation of applications through a virtual directory structure.

The namespace provides a way to identify a group of files as belonging together. Scripts and extension dlls within an application boundary form a unit of isolation. A unit of isolation always runs in a single server process. IIS administrators can either run applications in the same server process as IIS, or they can isolate the application by running it in a separate process. The ability to isolate an application is particularly helpful during development and testing. Isolated applications, however, will never perform as well as applications sharing the IIS process.

The following diagram illustrates the concept of an application boundary.

Notice that virtual directories can be nested. Also, notice that you can combine ISAPI dlls and ASP script pages in the same application.

For more information on combining ISAPI dlls and ASP script in an application, see Deploying Your Component and Application Isolation Issues in Creating Components for ASP