Creating a new website on IIS: Application vs. Virtual Directory. Whats the difference

iis

When you create a new website on IIS, you get to choose between an "Application" and a "Virtual Directory". What is the difference between those two options?

Best Solution

A virtual directory is just a pointer to where web pages are stored.

An Application reserves memory in IIS for your web pages. If you are attempting to run ASP pages and plan to make use of session variables and the such then you must use an application. An Application can make use of a virtual directory or it may just exist within the default web site directory (inetpub/wwwroot/)