Recipe12.21.Creating Applications


Recipe 12.21. Creating Applications

Problem

You want to create a new application for a web site or virtual directory.

Solution

Using a graphical user interface

To create a new application for a web site, do the following:

  1. Open Internet Information Services (IIS) Manager.

  2. In the left pane, expand the console tree and select your web site.

  3. Right-click on the web site and select Properties.

  4. Select the Home Directory tab.

  5. If the Default Application is already defined for the site, click Remove.

  6. Click Create and type a name for your new application.

  7. Assign appropriate execute permissions for your application.

  8. Assign your application to the appropriate application pool.

  9. Click Apply.

To create a new application for a virtual directory, do the following:

  1. Open Internet Information Services (IIS) Manager.

  2. In the left pane, expand the console tree and select a virtual directory under your web site.

  3. Right-click on the virtual directory and select Properties.

  4. Select the Virtual Directory tab.

  5. If a default application name is already defined for the site, click Remove.

  6. Click Create and type a name for your new application.

  7. Assign appropriate execute permissions for your application.

  8. Assign your application to the appropriate application pool.

  9. Click Apply.

Discussion

IIS terminology can be confusing, specifically:


Application

A group of files (usually ASP scripts) contained in a web site's home directory or a virtual directory (and possibly subdirectories) that clients (web browsers) can access to perform some programmatic function. For example, an ASP application could consist of a set of web pages with scripts in them to act as a front-end for a SQL database. Simply putting the web pages and scripts in a directory doesn't create an application; you still need to create an application by defining an application starting point (see below) so you can set boundaries for ASP sessions and so on.


Application starting point

Any subdirectory beneath the home directory (or any other virtual directory) for which you remove the parent application and define a new application. All subdirectories beneath this directory then become part of the new application. For example, by default the application name for the Default Web Site is Default Application. If you create a virtual directory named /Stuff within the Default Web Site, /Stuff is automatically assigned a new application starting point called Stuff and therefore is a separate application from the Default Application. To make /Stuff part of the Default Application instead, simply remove its application starting point. An easy way of telling whether a virtual directory is an application starting point is to look at the icon for the virtual directory in IIS Manager: a gear icon indicates a new application starting point, while a folder with the world on it indicates that the directory belongs to a parent application.


Application pool

A logical way of grouping applications together to assign them processing resources so they can execute efficiently and be isolated from one another (so that if one fails the others won't fail also). In the example just described, when you create the new /Stuff virtual directory, you can verify that Stuff defines a separate application when you select the Default Application Pool and see two applications (Default Application and Stuff) beneath it.

See Also

Recipe 12.22



Windows Server Cookbook
Windows Server Cookbook for Windows Server 2003 and Windows 2000
ISBN: 0596006330
EAN: 2147483647
Year: 2006
Pages: 380
Authors: Robbie Allen

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net