Create a new website in IIS: application or virtual directory. What's the difference?

When you create a new website in IIS, you can choose between β€œApplication” and β€œVirtual Directory”. What is the difference between these two options?

+30
iis
Jun 16 '09 at 17:54
source share
3 answers

There are several differences, here are the biggest:

  • In IIS 6 and later, you can assign an application a certain level of protection. (e.g. protection levels, application pools, etc.). You cannot do this with virtual directories.
  • If you work with ASP.NET, the search for the main "Web.config" file for your application stops at the level of your application. For the working directory, it will also check your parent hierarchy for the settings.

These are the two biggest differences, in my opinion, although there are other small ones.

+23
Jun 16 '09 at 18:02
source share

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

The application reserves memory in IIS for your web pages. If you are trying to run ASP pages and plan on using session variables, then you should use the application. An application can use a virtual directory or can only exist in the default website directory (inetpub / wwwroot /)

+27
Jun 16 '09 at 18:02
source share

From a web developer perspective:

A virtual directory is an IIS 5 container (Windows 2000 and earlier) for HTML content. You can also configure a virtual directory to interpret Active Server Pages (ASP) scripts and / or run Common Gateway Interface (CGI) applications. The virtual directory CANNOT host the ASP.Net web application.

The application container type was introduced with IIS 6 (Windows XP / Windows Server 2003 and later). It allows you to host ASP.Net web applications.

0
Oct 13 '17 at
source share



All Articles