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 m开发者_JAVA技巧ap 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?
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.
精彩评论