PDA

View Full Version : Problem Identifying Network Drive


cc.shine
06-09-2003, 10:24 PM
I'm struggling to load an intranet page based on the user logon. I tried unsuccessfully to get the info from ServerVariables, but didn't want the user to have to log into IIS after they've already logged onto the Novell network. My second option was to retrieve the user name from the I: drive, which we have mapped as a POBox with the person's name - ServerName\vol1\homes\UserName.

Currently I'm totally hosed up just trying to access the I: drive, let alone any subfolder. The C: drive is no problem, but if I change it to any other drive I get a Microsoft VBScript runtime error '800a0044' - Device unavailable error. Any suggestions to the code below would be tremendously appreciated!

<%
dim fs, d, n
set fs=Server.CreateObject("Scripting.FileSystemObject")
set d=fs.GetDrive("I:")
Response.Write("The drive letter is: " & d.driveletter)
set d=nothing
set fs=nothing
%>

arnyinc
06-10-2003, 04:50 PM
Where is the I: drive mapped?

If it is mapped on your computer, that will not work since you need the connection to work from server to server.

If it is mapped on the webserver, then you will have to always be logged in to the server so that the drive is always connected.

cc.shine
06-10-2003, 04:54 PM
It's mapped on the local workstation.

arnyinc
06-10-2003, 05:07 PM
You are trying to connect the webserver to ServerName\vol1\homes\UserName via asp. Neither of those two servers have a way of seeing what is mapped on your local workstation and using that for authentication.

FSO and network drives have always been a nightmare for me. They just don't work right.

cc.shine
06-10-2003, 07:11 PM
Thanks for the encouragement. Actually I think I may have it worked out using Windows Script Host.