Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 IIS 中创建了一个虚拟目录。我的项目托管在 D:/ 中,我想从我的项目中访问 C:/。因此,我在 IIS 中为 C:/ 创建了一个虚拟目录。现在,我如何从 Asp.net 访问这个虚拟目录?
您误解了虚拟目录。
虚拟目录允许客户端访问来自服务器的资源。 您不应该创建C:\虚拟目录。
C:\
您的 ASP.Net服务器端代码可以访问服务器文件系统中的任何内容,无需任何特殊配置。