0

I want to connect to a remote computer and copy a file in any location say C: drive using either C#.net or VB.net programming.

  • I have got the remote computer name and citrix login credentials(username, pwd) with me.
  • The remote machine's Remote Desktop Connection is disabled.
  • There is no shared drive available for mapping.

What approach should I follow.

A.Roy29
  • 11
  • 5
  • 1
    you can share a folder via the standard windows file sharing then google `how to download a file from network share in c#` – Jossef Harush Kadouri Jun 09 '16 at 06:40
  • Are you copying to a shared folder on the remote computer? What have you tried so far? – Andrew Mortimer Jun 09 '16 at 06:41
  • You can use a network drive: http://stackoverflow.com/questions/37717680/how-to-move-filesdlls-from-one-computer-another-computer-using-c-sharp/37717848#37717848 – naro Jun 09 '16 at 06:44
  • I have edited the question. Please see the modified question. The above approaches will not work there. – A.Roy29 Jun 09 '16 at 09:14

1 Answers1

1

Provided that the account running your application has sufficient user rights, you could try to use UNC paths to access the remote machine. Example:

\\machinename\c$\temp
\\machinename\d$\myApplication\Folder

You use these like normal paths in your C# application.

To switch to another user temporarily for the process of copying your files, you might want to try impersonation.

Community
  • 1
  • 1
Thorsten Dittmar
  • 55,956
  • 8
  • 91
  • 139