Defining IIS Application Boundaries

To define an application, the IIS metabase is configured programmatically or by using IIS Manager to designate the application's starting-point directory. Every file and folder under the starting-point directory in your Web site is considered part of the application. Therefore, you can use the directory structure to form application boundaries that define the scope of an application. You can have more than one application per Web site, and each application can be configured differently.

An application is a collection of Web content files that might contain any of the following:

  • ASP pages

  • ASP.NET content

  • COM+ components

  • ISAPI extensions

One of the most important tasks you face in developing your Web application is to determine how to assemble your Web content files into a single Web application. IIS uses the concept of a namespace to identify applications. A namespace is a way of associating an area of memory with an easily recognized name; it identifies a group of files as belonging together. IIS uses virtual directories to define namespaces for applications.

The following illustration shows how application pools are organized in IIS 6.0 running in worker process isolation mode. For previous versions of IIS, the structure is the same but without the Application Pools tree.

Application Pool Structure in IIS

IIS 5.1 and earlier: Worker process isolation mode and application pools are not available.

Scripts and ISAPI extension DLLs within an application boundary form a unit of isolation, which always runs in a single server process.

In addition to running applications in a single process, you can also separate your components from the ASP files that call them, by running them in an isolated or pooled process. An isolated process is the best configuration for debugging your components. To run your components in their own process, you must create a new application and add your components to it with the Component Services Manager. For more information about process isolation in IIS, see IIS Modes of Operation.

There are many possible configurations for applications, some of which are described in the following list:

  • Put all ASP files and components in the same process as IIS; this configuration provides the fastest performance.

  • Put all ASP files and components in a process other than the IIS process (pooled, out of process, or in a worker process on IIS 6.0).

  • Put all ASP files and components in a pooled process other than the IIS process, and isolate COM+ components using Component Services Manager.

  • Put all ASP files in the IIS process, and put components in another process.

Because process boundaries represent different areas of memory, calling between them requires some extra work by IIS. The mechanism for calling across process boundaries is known as marshaling. Marshaled calls are slower than calls within a single process. Pooled and isolated applications, therefore, do not perform as well as applications sharing the IIS process.

See Also