[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


Complaining Mapped Drive does not exist!!!

Posted on 2006-06-04
Medium Priority
Last Modified: 2008-01-09
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("Scripting.FileSystemObject")
If MyFile.driveexists("Q:") then
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....
Question by:ian_khoo_sc
LVL 31

Expert Comment

ID: 16832208
ASP runs under IUSR account by default, not administrator.  Set up permissions for IUSR.

Expert Comment

ID: 16832211
hi, you could try the following which creates the share dynamically

Set objNetwork = CreateObject("WScript.Network")

If MyFile.driveexists("Q:") then
'Disconnect Q drive if it existst
objNetwork.RemoveNetworkDrive  "Q:" , True

Response.Write("not exist")
' Connect Q drive
objNetwork.MapNetworkDrive "Q:" , "\\servername\test", "false", "Username", "password"

end if
LVL 22

Accepted Solution

WMIF earned 500 total points
ID: 16834910
its better to skip the drive mapping and use the unc path to access the share.  


mapped drives are user assigned, not system assigned.  you may be able to make it work by signing in as admin and mapping that drive, but its best to use the unc path.
LVL 15

Expert Comment

ID: 16854897
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.

Author Comment

ID: 16857893
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...

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question