使虚拟词典在 IIS 默认文件列表中可见和可访问

Making Virtual Dictionaries Visible and Accessible on IIS default file listing

我正在尝试让虚拟目录像常规目录一样显示在我的文件服务器上。我有虚拟目录设置,但它不会出现在默认目录浏览站点上,尽管它可以手动浏览。我怎样才能让它像普通文件夹一样从这里显示出来,可以浏览。

你需要先了解虚拟目录是什么

A virtual directory is a directory name (also referred to as path) that you specify in Internet Information Services (IIS) 7 and map to a physical directory on a local or remote server. The virtual directory name becomes part of the application's URL, and users can request the URL from a browser to access content in the physical directory, such as a Web page or a list of additional directories and files. If you specify a different name than the physical directory for the virtual directory, it is more difficult for users to discover the actual physical file structure on your server because the URL does not map directly to the root of the site.

虚拟目录并不真正存在,它被用作URL映射到物理目录的一部分。 IIS中的目录浏览模块用于浏览物理目录。

所以你想将虚拟目录显示为物理文件夹,这在IIS中是不可能的。

不过,我认为您可以通过编程方式实现此功能。在页面新建文件夹UI,指向虚拟目录URL。但是您不能将此方法与目录浏览相结合。这相当于创建一个应用程序只是为了浏览所有目录(虚拟和物理)。