I think you're getting confused between virtual directory mappings and windows drive mappings.
Mapping a windows drive to the network folder will not help you because thses mappings are user specific and cannot be guaranteed to be the same for all users.
So you want to search a drive on the LAN for files and display links to the found files so your users can access those files right? Here's what to do:
1. set up a virtual directory in IIS which is mapped to the network folder. To do this you need to go into Internet Services Manager and locate your web folder in the tree. Right-click the web folder and choose New > Virtual Directory. In the dialog box that pops up you then enter an alias for it (e.g. lanfolder) - this is the name you will use in your Server.MapPath statements in asp. Click next and enter the path to the network folder - this should be a UNC path like \\server\folder\subfolder, not a windows path like x:\folder\subfolder. Then when you click next you will be asked to provide a user and password to access the directory - this is the step that will allow your asp access to the lan folder, and also allow your users to view the files. For the mo you can just put in your own user id, but for production you will need a dedicated network logon for this purpose. Once this is finished you should have a tree view showing Default Web Site > yourapp > lanfolder. Finally, make sure that lanfolder is a subfolder, not a sub-application (you can tell by the icon - it should be a folder with a small globe - if its not then right-click lanfolder, choose properties and then on the virtual directory path, click the Remove button next to the Application name box, then hit OK to close the dialog).
2. right, now you're ready to search this folder using asp. To get hold of the folder just use a line like this:
Set objFolder = objFSO.GetFolder(Server.MapPath("lanfolder"))
(this assumes that the asp page will be in yourapp folder, not any other subfolder you might have).
3. The final thing is to provide links to the found documents for the users.
Response.Write "<LI><A HREF=""lanfolder/" & objFile.Name & _
""">" & objFile.Name & "</A><BR>"
When the user clicks on that link it will open the document - the user does not have to have any special drive mappings to see the document.
hth
Phil
|