There is a term very famous in IIS world ‘virtual directory’, but before discussing a virtual directory, we should be familiar with the term ‘alias’.By definition, an object can have alternative name. If we have a directory like “C:\Projects\Web” , then we can give or specify an alternative name for it like “Web” instead of mentioning full path.

Lets create a project, put the files at the location mentioned above and just a tweak on IIS and voila! virtual directory is ready. So what’s this tweak?

  • Open your IIS, inetmgr.exe



  • Right click on your website and select “Add Virtual Directory”.

Virtual Directory

Virtual Directory

  • Provide the directory path in the open dialog box, give an alias name to the directory.



That’s all what is needed to create a virtual directory.

This virtual directory is used with the localhost url like “http://localhost/Web/” to reach out the pages stored in the directory “C:\Projects\Web.”

Note : By Default, “http://locahost” refers to the directory “C:\inetpub\wwwroot”

Author: hershey

A passion for knowledge drives me to do programming, A passion for programming drives me to create something different, A passion for creation drives me to spread the knowledge.

Share This Post On


  1. nice superb explaination

    Post a Reply
  2. thanks for the tutorial
    I am having a problem.
    The feature “Create SQL server database” isn’t available , I can’t select it.
    Can you help, please ?

    Post a Reply

Submit a Comment

Your email address will not be published. Required fields are marked *

More from CodeSpread:

  • IIRF.ini for URL rewritingIIRF.ini for URL rewritingWe often hear the terms like URL rewriting or friendly URLs. There are many techniques available to achieve it and we will discuss one of those today, IIRF. What is URL rewriting? Before we try t...
  • IIS- Still learning!IIS- Still learning!Whenever we receive some error which is related to IIS, we just jump on internet as we lack the basic concepts of IIS and i can definitely say that we almost ignore IIS and focus ourselves on devel...
  • App_Offline Updates in Webdeploy V3 and Visual Studio 2013App_Offline Updates in Webdeploy V3 and Visual Studio 2013Please refer Don’t Mess with App_Offline article to see the usefulness of App_Offline. Treat the below article as an update to the concepts and basics shared earlier. After going through visual ...
  • IIS Pre-ArticleIIS Pre-ArticleI thought of sharing few articles on IIS so when I started my mission, I realized that there should be some basic tasks related to IIS which needs to be done by the user before diving deep into IIS...
  • Time Out: Not a Technical postTime Out: Not a Technical postTaking my time-out from technical world for once and sharing a regular joke in the form of  this comic with you. There is no harm in showing funny side also sometimes. wat say!!
  • Creation of DemoSpaceCreation of DemoSpaceThe Backend URL shown in the article : NetBiscuits: How fascinating can it be to create a mobile website? is the Demospace server location where the Published files of the applications will be plac...
  • Don’t Mess with App_OfflineDon’t Mess with App_OfflineOne of the most useful features of ASP.NET is the "App_Offline.htm" . It provides a much easy way to make the ASP.NET application offline while we do our modifications on the site. How we do it? ...
  • Windiff saved my effort. How it is useful?Windiff saved my effort. How it is useful?While working with TFS [Team foundation server],we get used of the compare feature to compare the 'local version', 'server version','workspace version'. We had some similar situation when we rec...