Understanding Physical and Virtual Directory Structures

Beyond home directory wwwroot, Microsoft Web sites also use the following:
■ Physical directories
■ Virtual directories
The difference between physical and virtual directories is important. A physical
directory is part of the file system, and to be available through IIS, it must exist as a
subdirectory within the home directory. A virtual directory is a directory that isn’t
necessarily contained in the home directory but is available to clients through an alias.
Physical directories and virtual directories are configured and managed through the
IIS Manager, but they’re displayed differently.
Both physical and virtual directories have permissions and properties that you can set
at the operating system level and the IIS level. You set operating system permissions
and properties in File Manager dialog boxes in Control Panel. You set IIS permissions and
properties in your website properties in CP.

You create physical directories by creating subdirectories within the home directory by
using File Manager. For example, you create a Web site with the
DNS name Users are able to access the Web site by using the
URL You then create a subdirectory within the home
directory called “firstsubdirectory.” Users are able to access the subdirectory by using the URL path

Even though locating your content files and directories within the home directory
makes it easier to manage a Web site, you can also use virtual directories. Virtual
directories act as pointers to directories that aren’t located in the home directory. You
access virtual directories by appending the directory in Virtual directory tab for the site properties.
If, for example, your home directory is C:\HostingSpaces\youraccountname\yoursitename\wwwroot, and your pages or documents in C:\HostingSpaces\youraccountname\yoursitename\wwwroot\firstsubdirectory\seconddirectory, you would need to create a virtual directory that points to the actual seconddirectory location. Visitors to the web site could access the directory by using the URL path

Was this answer helpful?

 Print this Article

Also Read

MS SQL 2008 and MySQL server addresses

MSSQL 2008 server addresses are:

I get error when conneting to MS SQL 2008 server

If you get this error: The server principal " " is not able to access the database " " under the...

How to enable remote IIS management for my site?

Login to your hosting control panel here then click on Web - Web...

Connecting to a SQL Server or MySQL Database in WebMatrix

Connecting to a SQL Server or MySQL Database in WebMatrix WebMatrix includes SQL Server Compact,...