0

I'm trying to copy a file with the command :

 File.Copy(source, dest, true);

when "dest" is address of remote computer . When I run this command i got error that "Access to path is denied".

I understood that the problem is caused by the fact that i didn't have permission to the remote computer, so I want to connect to the remote computer before I trying to copy the file.

How can I log in and set the credentials to the computer using .NET Core?

thank you.

shani klein
  • 334
  • 1
  • 2
  • 14
  • I think you have to add a user on remote computer with specific username and password and impersonating the user before copying file. – Aria May 15 '18 at 08:10
  • I'n not sure, but you can look at `NamedPipes` which commonly is used for Network Interprocess Communication. It allows you send messages as `byte[]` between different processes. – Joseph Katzman May 15 '18 at 08:18
  • @Aria how can I add user to remote computer? – shani klein May 21 '18 at 06:00

0 Answers0