A virtual directory is a folder name, used in an address, which corresponds to a physical directory on the Web server or a Universal Naming Convention (UNC) location. This is also sometimes referred to as URL mapping. Virtual directories are used to publish Web content from any folder that is not contained in the home directory of the Web site. When clients access content in a virtual directory, the content appears to be in a subdirectory of the home directory, even though it is not.
For security reasons, you might want to move the Web site content to a different disk volume during the application deployment process. You can move the content to another disk volume on the Web server or to a shared folder on a separate server. You can use virtual directories to specify the UNC name for the location where the content is placed, and provide a user name and password for access rights.
For each virtual directory required by the ASP.NET application, create a corresponding virtual directory on the Web server by completing the following steps:
1. | Create the folder on the Web server to contain the virtual directory content. Ensure that you create the folder in a secure manner that does not compromise the security of the Web server. For more information about securing virtual directories, see Preventing Unauthorized Access to Web Sites and Applications. |
2. | Create the virtual directory under the appropriate Web site on the server. For more information about how to create virtual directories, see Create a Virtual Directory. |