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
- Click Start, point to Administrative Tools, and then click Internet Information Services.
- Expand the local computer node (which might be indicated by your computer name), expand Web Sites, and click Default Web Site.
- On the Action menu, click New, and then click Virtual Directory.
- In the Virtual Directory Creation Wizard, click Next.
- Enter the name of your application in the Alias text box, and then click Next.
- Enter the physical directory that you created to prepare for this walkthrough, C:\myWebApp, and then click Next.
- 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.
- Click Finish.
To create a virtual directory using Windows XP
- Click Start, and then click Control Panel.
- If you have not done so already, click Switch to Classic View.
- Double-click Administrative Tools, and then click Internet Information Services.
- Expand the local computer node (which might be indicated by your computer name), expand Web Sites, and click Default Web Site.
- On the Action menu, click New, and then click Virtual Directory.
- In the Virtual Directory Creation Wizard, click Next.
- Enter the name of your application in the Alias text box, and then click Next.
- Enter the physical directory that you created to prepare for this walkthrough, C:\myWebApp, and then click Next.
- In the Access Permissions page, check the access permissions that you want for your application, and then click Next.
- Click Finish.
To create a virtual directory using Windows 2000
- Click Start, point to Applications, point to Administrative Tools, and then click Internet Services Manager.
- Expand the local computer node (which might be indicated by your computer name), expand Web Sites, and click Default Web Site.
- On the Action menu, click New, and then click Virtual Directory.
- In the Virtual Directory Creation Wizard, click Next.
- Enter the name of your application in the Alias text box, and then click Next.
- Enter the physical directory that you created to prepare for this walkthrough, C:\myWebApp, and then click Next.
- In the Access Permissions page, check the access permissions that you want for your application, and then click Next.
- 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
- Open the MMC to the Default Web Site as shown in the previous procedures.
- In the Default Web Site, click the subdirectory that you want to designate as an application root. For this example, this is myWebApp.
- Right-click the directory that you want to be the application root, and then click Properties.
- In the Application Settings section on the Directory tab, click Create.
- 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