views:

25

answers:

1

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  A: 

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.

Andreas Schuldhaus
I figured it had to be something like this. My problem now is that the virtual directory gets a red error icon in the IIS management console, even though I have access rights to the share, and provide the correct login credentials.
helgeg
If you are sure, that there isn't a folder permissions problem, try to mark the new virtual directory as application and give the right execution permissions. If the problem persist it is highly recommended to add a new user account on your main server which has the same name and password as the server hosting the share.
Andreas Schuldhaus