I am trying to copy the file from C:\Temp folder to one of folder on server which needs to have authenticated. (folder has username and password) my code is below:
Code:
NetworkShare.DisconnectFromShare(@"\\server-a\DBFiles", true); //Disconnect in case we are currently connected with our credentials;
NetworkShare.ConnectToShare(@"\\server-a\DBFiles", "user1", "password1!"); //Connect with