ian_khoo_sc
asked on
Complaining Mapped Drive does not exist!!!
I used subst command to substitute local folder C:\test\ to a mapped drive Q:
But when ASP page want to access to the Q: drive, it is complaining the drive does not exist.
I had shared out c:\test and given administrator full control of the permission.
Code below showed how i checked on the Q: drive.
Set MyFile = Server.CreateObject("Scrip ting.FileS ystemObjec t")
If MyFile.driveexists("Q:") then
Response.Write("exist")
else
Response.Write("not exist")
end if
On the IIS setup, i am using administrator as User Name for Anonymous access.
Please advise why the ASP page still unable to access the Q: drive....
Thanks
But when ASP page want to access to the Q: drive, it is complaining the drive does not exist.
I had shared out c:\test and given administrator full control of the permission.
Code below showed how i checked on the Q: drive.
Set MyFile = Server.CreateObject("Scrip
If MyFile.driveexists("Q:") then
Response.Write("exist")
else
Response.Write("not exist")
end if
On the IIS setup, i am using administrator as User Name for Anonymous access.
Please advise why the ASP page still unable to access the Q: drive....
Thanks
ASP runs under IUSR account by default, not administrator. Set up permissions for IUSR.
hi, you could try the following which creates the share dynamically
Set objNetwork = CreateObject("WScript.Netw ork")
If MyFile.driveexists("Q:") then
Response.Write("exist")
'Disconnect Q drive if it existst
objNetwork.RemoveNetworkDr ive "Q:" , True
else
Response.Write("not exist")
' Connect Q drive
objNetwork.MapNetworkDrive "Q:" , "\\servername\test", "false", "Username", "password"
end if
Set objNetwork = CreateObject("WScript.Netw
If MyFile.driveexists("Q:") then
Response.Write("exist")
'Disconnect Q drive if it existst
objNetwork.RemoveNetworkDr
else
Response.Write("not exist")
' Connect Q drive
objNetwork.MapNetworkDrive
end if
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I agree with WMIF.
Unless you're using domain users you'll have to duplicate the web server user on the remote server with identical passwords and grant it permissions.
Unless you're using domain users you'll have to duplicate the web server user on the remote server with identical passwords and grant it permissions.
ASKER
We are using domain users, the web server is login using domain/administrator account and i had already given full control for the domain/administrator. However, It is still not working with the mapped drive.
I will use the unc path mention by WMIF. Thanks for all the contribution from yours...
I will use the unc path mention by WMIF. Thanks for all the contribution from yours...