I am a little confused about some basic concepts about Microsoft IIS 7 (Internet Information Services). Could anyone give me concise definitions on the following terms:
- Host
- Site
- Web Application
- Virtual Directory
- Application Pool
Especially: what’s the difference between Site, Web Application and Virtual Directory?
Update – 1 – 8:49 AM 12/20/2010
A related topic: Difference between web site and web application
Some “quick and dirty” answers:
Host: The machine that is hosting IIS (can be a physical machine or a virtual machine).
Site: A website that is not the child of another site.
Web Application: A website. Usually if they are referred to as “web applications” then they are very data driven and it is not a static site.
Application Directory: Essentially a child website. It can have its own application pool, but settings can also be inherited from the parent website (HTTP handlers and HTTP modules for example). You didn’t specifically ask about this one, but I added it as it may have been what you meant by “Web Application”.
Virtual Directory: A directory of a website that has a physical location that is different than the website itself. One common use for this is to have a web farm, but some of the content is located on a shared resource (such as a SAN or NAS). This prevents the need of replicating files between all servers of a web farm. There are other purposes of a virtual directory, but this is the main reason I’ve used them in the past.
Application Pool: The process that a .NET application runs as. This may be used by things over than .NET, but that’s the only piece I know that currently uses application pools. Essentially this holds the user and other information that the .NET application runs under. For instance, if you are using a trusted connection to SQL Server (SSPI), then by default, the user it will connect to the database as the user that this process is running as (unless you have impersonation in the web application set). This is also the user that will be used if the web application accesses system resources.