Similarities and differences between IIS applications and virtual directories

In IIS, applications and virtual directories are particularly easy to confuse, but the two are completely different concepts. Here is my own understanding. If there is anything wrong, please correct me.

        The application is a logical boundary that can separate the website and its components. The virtual directory is a real pointer, which points to a local or remote physical path. Virtual directories always exist in applications, and one application can include multiple virtual directories.

——Excerpt from "IIS7 Development and Management Complete Reference Manual"

application:

        In general, an application is a website (but not in all cases), and if an application is created in an application, then it is a sub-application of this website, such as our common front-end user browsing function and background management function, In this way, we can be divided into two sub-applications, but we can also implement this function through the application framework, not necessarily dependent on the IIS application function, the meaning of the existence of the application in IIS is probably the same.


virtical list:

        The existence of virtual directories can be understood as a distributed realization method. Speaking of virtual directories, we need to introduce the concept of physical paths. The physical path is the path that actually exists on the disk, and the virtual directory is a pointer to the physical path, which is equivalent to a shortcut. With the virtual directory function, we can place the components of the website wherever we want, not just the disk on which we create the website application.

If there is no virtual directory, if we create a website on D drive, then all the components of this website, such as pictures, program codes, template files, and some even video files, can only be on D drive This website directory, so that the website application can run. With the virtual directory function, we can use the virtual directory to point to other drive letters, or point to a network path, so that the components of the website are not limited to the disk where the website application is located, and the distributed storage of files is realized, which also breaks through the disk. The bottleneck of the upper capacity limit.


In IIS, the application can choose the application pool, which shows that it is an independent whole. Although we sometimes create child applications for the application, it does not depend on the parent application, but is independent. The virtual directory cannot choose the application pool, which also shows that it is an integral part of the application.


Guess you like

Origin blog.csdn.net/wang740209668/article/details/78583029