Configure Virtual Directories in IIS

Using Internet Information Services (IIS) Manager, you can create a virtual directory for an ASP.NET Web application. A virtual directory appears to client browsers as though it were contained in a Web server's root directory, even though it can physically reside somewhere else. This approach enables you to publish Web content that is not located under the root folder on your Web server, such as content that is located on a remote computer. It is also a convenient way to set up a site for local Web development work because it does not require a unique site identity, which means that it requires fewer steps than creating a unique site. This topic explains how you can create a virtual directory and configure it to run ASP.NET pages.

To start IIS Manager :
  1. On the Start menu, click Run.
  2. In the Open box, type inetmgr and click OK.
To start IIS Manager from the Administrative Services console:
  1. On the Start menu, click Run. In the Run text box, type control panel, and then click OK.
  2. In the Control Panel window, click Administrative Tools.
  3. In the Administrative Tools window, click Internet Information Services.
Creating the Virtual Directory:

Now that IIS Manager is started, you are ready to create a virtual directory.
To create a virtual directory by using IIS Manager
  1. In IIS Manager, expand the local computer and the Web site to which you want to add a virtual directory. Right-click the site or folder within which you want to create the virtual directory, point to New, and then click Virtual Directory.
  2. In the Virtual Directory Creation Wizard, click Next.
  3. In the Alias box, type a name for the virtual directory and then click Next. Choose a short name that is easy to type, because the user types this name to access the Web site.
  4. In the Path box, type or browse to the physical directory that contains the virtual directory, and then click Next. Note that you can select an existing folder or create a new one to contain the content for the virtual directory.
  5. Select the check boxes for the access permissions that you want to assign to your users. By default, the Read and Run Scripts check boxes are selected; these permissions enable you to run ASP.NET pages for many common scenarios.
  6. Click Next and then click Finish.
To configure security and authentication for a virtual directory:
  1. In IIS Manager, right-click node for the virtual directory that you want to configure, and then click Properties.
  2. Click the Directory Security tab, and then in the Authentication and access control section, click Edit.
  3. Select the check box for the authentication method or methods that you want to use for your virtual directory, and then click OK. By default, the Enable anonymous access and Windows Integrated Authentication check boxes are already selected.
  4. In Windows Explorer, navigate to the folder that will contain the pages for the site. Right-click the folder and then click Sharing and Security on the shortcut menu.
  5. On the Security tab, configure any additional accounts and permissions that you need, and then click OK.
Tags: ,
Hot on Web:


About author