我在一台机器上有一个文件共享。在另一台机器上,我运行着 IIS 和 web 应用程序。通过网络应用程序,我希望能够提供共享中的文件供下载。在 IIS 计算机上,如何持久地将文件共享驱动器映射到驱动器 Z:?
如果我使用普通用户映射驱动器,则映射会在用户会话结束时消失,对吧?是否可以永久映射驱动器,以便 IIS 可以访问其上的文件,无论是否有人登录?
I have a file share on a machine. On another machine I have IIS and a webapp running. Through the webapp, I want to be able to offer files from the share for download. On the IIS machine, how can I persistently map the fileshare drive to say drive Z:?
If I map the drive with a regular user, the mapping disappears when the user session ends, right? Is it possible to map the drive persistently so that IIS can access the files on it regardless of whether someone is logged in or not?
发布评论
评论(1)
您不能使用
Z:
等映射驱动器。请改用 UNC 路径 (\\someserver\someshare\
) 来访问网络上的内容。您必须在 Web 中创建一个指向 UNC 路径的虚拟目录。系统还会询问您是否要使用静态用户名以及您要允许哪些访问权限。You can't use mapped drives like
Z:
. Use UNC paths (\\someserver\someshare\
) to access content on the network, instead. You have to create a Virtual Directory in your web which points to the UNC path. You will also be asked some questions whether you want to use a static username or not and what access permissions you want to allow.