This documentation is archived and is not being maintained.

Walkthrough: Creating an ASP.NET Web Application Root Directory with IIS

The steps in this walkthrough show you how to mark a directory as an application root directory using Internet Information Services (IIS). The walkthrough tells you how to create a virtual directory and set the C:\Inetpub\Wwwroot directory as the root directory for your application.

To prepare for this walkthrough

  • Create a new directory. This walkthrough uses the directory C:\myWebApp.

Next, open the Microsoft Management Console (MMC) for IIS and create a virtual directory using one of the following procedures.

To create a virtual directory using the Windows Server 2003 family

  1. Click Start, point to Administrative Tools, and then click Internet Information Services.
  2. Expand the local computer node (which might be indicated by your computer name), expand Web Sites, and click Default Web Site.
  3. On the Action menu, click New, and then click Virtual Directory.
  4. In the Virtual Directory Creation Wizard, click Next.
  5. Enter the name of your application in the Alias text box, and then click Next.
  6. Enter the physical directory that you created to prepare for this walkthrough, C:\myWebApp, and then click Next.
  7. On the Access Permissions page, be sure the Read and Run scripts check boxes are selected.

    These are the only permissions required to run an ASP.NET Web application.

  8. Click Finish.

To create a virtual directory using Windows XP

  1. Click Start, and then click Control Panel.
  2. If you have not done so already, click Switch to Classic View.
  3. Double-click Administrative Tools, and then click Internet Information Services.
  4. Expand the local computer node (which might be indicated by your computer name), expand Web Sites, and click Default Web Site.
  5. On the Action menu, click New, and then click Virtual Directory.
  6. In the Virtual Directory Creation Wizard, click Next.
  7. Enter the name of your application in the Alias text box, and then click Next.
  8. Enter the physical directory that you created to prepare for this walkthrough, C:\myWebApp, and then click Next.
  9. In the Access Permissions page, check the access permissions that you want for your application, and then click Next.
  10. Click Finish.

To create a virtual directory using Windows 2000

  1. Click Start, point to Applications, point to Administrative Tools, and then click Internet Services Manager.
  2. Expand the local computer node (which might be indicated by your computer name), expand Web Sites, and click Default Web Site.
  3. On the Action menu, click New, and then click Virtual Directory.
  4. In the Virtual Directory Creation Wizard, click Next.
  5. Enter the name of your application in the Alias text box, and then click Next.
  6. Enter the physical directory that you created to prepare for this walkthrough, C:\myWebApp, and then click Next.
  7. In the Access Permissions page, check the access permissions that you want for your application, and then click Next.
  8. Click Finish.

You can also create an application root directory from an existing directory in Inetpub\Wwwroot. To prepare for this walkthrough, create a directory in the C:\Inetpub\Wwwroot directory. As before, name it myWebApp.

To mark an existing directory in Inetpub\Wwwroot as a Web application using IIS

  1. Open the MMC to the Default Web Site as shown in the previous procedures.
  2. In the Default Web Site, click the subdirectory that you want to designate as an application root. For this example, this is myWebApp.
  3. Right-click the directory that you want to be the application root, and then click Properties.
  4. In the Application Settings section on the Directory tab, click Create.
  5. In the Application name text box, enter the name of the application, and then click OK.

See Also

ASP.NET Application Walkthrough | Walkthrough: Creating a Directory Structure for an ASP.NET Web Application | Walkthrough: Creating a Directory Structure for an ASP.NET Web Application | Walkthrough: Deploying an ASP.NET Web Application

Show: