By using IIS Manager, you can create a virtual directory for an ASP.NET Web application that is hosted in IIS 7.0. A virtual directory appears to client browsers as if it is in the 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 of the 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 Web site for each virtual directory.

  1. In IIS Manager, expand the local computer and the Sites folder, and then find the Web site that you want to add a virtual directory for. Use the following steps:
    • For , right-click the site or folder where you want to create the virtual directory, and then click Add Virtual Directory.
    • For Windows Server 2008, right-click the site or folder where you want to create the virtual directory, click Manage Web Site, and then click Add Virtual Directory.
  2. In the Add Virtual Directory dialog box, specify the following information:
    • Alias. Type a name for the virtual directory. Choose a short name that is easy to type, because the user types this name to access the Web site.
    • Physical Path. Type or browse to the physical directory that contains the virtual directory. You can select an existing folder or create a new one to contain the content for the virtual directory.
  3. To provide credentials to connect to a UNC path, click the Connect as button.
  4. Click OK.

    To configure security for a virtual directory for an existing account

    1. In IIS Manager, select the virtual directory that you want to configure, and then click Edit Permissions in the Actions pane.

      The virtual directory’s Properties dialog box is displayed.

    2. Click the Security tab.
    3. Click Edit.

      The Permissions dialog box is displayed.

    4. Select an existing account in the Group or user names list.
    5. Select the appropriate permissions check boxes from the Permissions list for the selected group or user, as required for your virtual directory security.
    6. Click Apply to apply the changes.
    7. Click OK to close the Permissions dialog box.
    8. Click Apply to apply the changes in the Properties dialog box.
    9. Click OK.

    To configure security for a virtual directory for an new account

    1. In IIS Manager, select the virtual directory that you want to configure, and then click Edit Permissions in the Actions pane.

      The virtual directory’s Properties dialog box is displayed.

    2. Click the Security tab.
    3. Click Edit.

      The Permissions dialog box is displayed.

    4. Click Add to add an account.

      The Select Users, Computers, or Groups dialog box is displayed.

    5. Add a user, computer, or group as required for you virtual directory security.
    6. Click OK to close the Select Users, Computers, or Groups dialog box.
    7. Select the appropriate permissions check boxes from the Permissions list for the new user, computer, or group, as required for your virtual directory security.
    8. Click Apply to apply the changes.
    9. Click OK to close the Permissions dialog box.
    10. Click Apply to apply the changes in the Properties dialog box.
    11. Click OK.

    To configure authentication for a virtual directory

    1. In IIS Manager, select the virtual directory that you want to configure.
    2. In Features View, double-click Authentication.
    3. Select the authentication type to configure, and in the Actions pane make sure Enable is selected in order to enable the authentication type.

      If the authentication type is already enabled, the Actions pane enables you to disable or edit authentication configuration.

    4. In the Actions pane, click Edit or Advanced Settings to configure additional properties for the authentication type you selected.

      The actions available in the Actions pane vary depending on the authentication type you selected. For example, if the Anonymous Authentication module is installed and is enabled, you can click Edit to edit additional properties of anonymous authentication. If the Window Authentication module is installed and is enabled, you can clickAdvanced Settings to edit properties of windows authentication.

Post By Gishore J Kallarackal (2,121 Posts)

Gishore J Kallarackal is the founder of techgurulive. The purpose of this site is to share information about free resources that techies can use for reference. You can follow me on the social web, subscribe to the RSS Feed or sign up for the email newsletter for your daily dose of tech tips & tutorials. You can content me via @twitter or e-mail.

Website: → Techgurulive

Connect