ltyao
asked on
How to mapnetworkdrive in ASP?
Hello experts:
I would like to develop login webpage by using asp. After user login, this application actomatically mapnetworkdrive for them. I had one window based login application, that developed by VB Script. It works very well, no any problem. When I develop one simple login interface, just copy the vbscript to that program. Unfortunately, it tells me "WSHNetwork.RemoveNetworkd rive (0x800708CA) This network connection doesn't exist". Does someone know how to solve the problem? Thanks in advance!
I would like to develop login webpage by using asp. After user login, this application actomatically mapnetworkdrive for them. I had one window based login application, that developed by VB Script. It works very well, no any problem. When I develop one simple login interface, just copy the vbscript to that program. Unfortunately, it tells me "WSHNetwork.RemoveNetworkd
Most probably permission issue. Does IUSR_{yourservername} user has permission to remove network drive ?
ASKER
I run the page on localhost, how to know if I have permission to remove networkdrive? Thanks!
is network drive another computer..?
ASKER
Yes, the drives will be mapped in another computer. Before I use vb script to map networkdrive, no any problem. I thought that ASP also can be implemented by vb script, should work in same way. But I can't figure out why it didn't work.
Thanks!
Thanks!
https://www.experts-exchange.com/questions/21392716/I-am-Getting-a-'Permission-Denied'-error-when-trying-to-connect-to-an-Access-Database-residing-on-a-different-computer.html
ltyao, I encourage you to read this one thoroughly not just accepted answer, same issue was solved and bunch of other good info has been shared
ltyao, I encourage you to read this one thoroughly not just accepted answer, same issue was solved and bunch of other good info has been shared
ASKER
Hi, davidlars99 :
Thanks for your information, I do learn a lot. Unfortunately, this still didn't solve my problem.
I use "objNetWork.MapNetworkDriv e "H:", "\\genabc\DATA" , strProfile, strUser, strPassword" in my ASP page. at beginning it does map to networkdrive, then I thought that it was not a permission issue, (because I use VB script to map networkdrive, it works fine, never complain permission problem, I use the same code in ASP). Unfortunately, after I run this page a few times, it only display "Network Drive (H)", when you try to disconnect this drive, it tells you "Network drive couldn't be found".
Now I'm confusing very much, don't know what I was doing wrong. If you have any suggestion or solution, please let me know, thanks!
Thanks for your information, I do learn a lot. Unfortunately, this still didn't solve my problem.
I use "objNetWork.MapNetworkDriv
Now I'm confusing very much, don't know what I was doing wrong. If you have any suggestion or solution, please let me know, thanks!
after all it may have to do with the security settings on the website. If you have the default user as the anonymous user (usualy IUSR_<machinename>) this user does not have permission to create a map drive on the sytem or at least is limited, change the setting in IIS for the website to be run as a local box user that has permissions to perform this action and it should work for you.
change security options only on that particular asp page and nothing else, use appropriate user and require login to access that page.
ASKER
I just check my account IUSER_ComputerName, how to I change this account permission? Thanks!
ASKER
Afte run this asp page, it can display "H:", "\\genabc\DATA" on webpage. but if expand all of drives, you only still can see "Network Drive (H)". I think that this program already connect to network to get Drive Letter and Shareserver name, but why it doesn't display on computer. THanks!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi, davidlars99
You are geniuses!
I just do the change followed the first method, it works fine now. Thank you very much! I really appreciate!
You are geniuses!
I just do the change followed the first method, it works fine now. Thank you very much! I really appreciate!
as I said earlier, do not give direct access to untrusted users to that page instead you should require them to login!