Hi,
How could i copy a file from a machine to a remote server through c# code. I need help as to what methods i can use and where i need to specify the credentials of the remote server
Thanks in advance
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Vipul KelkarPosted Jan 26, 2011, 2:42 AM
I used windows impersonation and used the credentials of the remote machine with the LogonUser method . Then i used the simple file.copy with the destination path as the path of the remote drive.
File.Copy(@"local path",@\\remote_machine_name\d$); to copy the file to D:\ drive of the remote machine
thiago costaPosted Jan 26, 2011, 1:39 AM
Krishna GaradPosted Jan 25, 2011, 4:45 AM