Hi
I’m trying to write a small utility that allows people to map to a remote drive without making the connection persistent.
So I use the code below in a window form
Dim WshNetwork As Object
WshNetwork = CreateObject("WScript.Network")
WshNetwork.MapNetworkDrive("E:", "\\SomeServer\SomeShare", , txtUsername.Text.ToString, txtPassword.Text.ToString)
the problem is the MapNetWorkDrive does not care what password I supply , I could type "mypassword" or "hello" and it will still work as long my txtUsername =domain\ntAccount.
then this is the kicker if I want to log in to a certain share as a different user/ password (given userid & password are valid)I get the dreadful error "Multiple connections to a server or shared resource by the same user, using more than one user name, are not allowed. Disconnect all previous connections to the server or shared resource and try again.."
Any thought any suggestions, any other ways in .net/ windows form asp.net...
Regards
I’m trying to write a small utility that allows people to map to a remote drive without making the connection persistent.
So I use the code below in a window form
Dim WshNetwork As Object
WshNetwork = CreateObject("WScript.Network")
WshNetwork.MapNetworkDrive("E:", "\\SomeServer\SomeShare", , txtUsername.Text.ToString, txtPassword.Text.ToString)
the problem is the MapNetWorkDrive does not care what password I supply , I could type "mypassword" or "hello" and it will still work as long my txtUsername =domain\ntAccount.
then this is the kicker if I want to log in to a certain share as a different user/ password (given userid & password are valid)I get the dreadful error "Multiple connections to a server or shared resource by the same user, using more than one user name, are not allowed. Disconnect all previous connections to the server or shared resource and try again.."
Any thought any suggestions, any other ways in .net/ windows form asp.net...
Regards