locked
What should be used Remoting or File.Copy() RRS feed

  • Question

  •  

    Hi,

     

    I need to copy a file from one server to another server. It will always be one way.

    So what do I use File.copy() or should i implements it using sockets or remoting ?

    Please advise.

     

    Thanks

    Monday, January 14, 2008 11:13 AM

Answers

  • Dear NetFresher,

     

       If you use File.Copy(), you will have to take into consideration all the access right related issues that you will face. If is better to use .NET Remoting for copying a file. You can customize it for making it more secure by encrypting the steram using asymmetric cryptography. In .NET remoting you can use file streams and memory streams  and socket communication to transfer the file or you can also use the FTP way. In the FTP way you will require server authentication.

     

    Regards,

    Sandeep A

    ----------------------------------------------------------------------

    [Mark appropriate post(s) as Answer(s)]

     

     

     

    Thursday, January 17, 2008 5:00 AM
  • Sometimes you may need to set ftp as the trusted site. Check with your authentication propertly to get it done.
    Thursday, January 17, 2008 5:58 AM

All replies

  •  

    why not use the simplest one, File.copy() ???
    Monday, January 14, 2008 11:18 AM
  • My view- If servers are in LAN then you should use File.Copy(). Else if they are in WAN (internet) then you may use Remoting.

    Monday, January 14, 2008 2:22 PM
  • I am trying to connect to a FTP server through the code. Using the FTPClient code from codeproject. But am unable to login to the FTP server.

    However on manually connecting to the FTP server it gets connected.

    Any help would ne appreciated.

     

     

    Thursday, January 17, 2008 4:09 AM
  • I am trying to connect to a FTP server through the code. Using the FTPClient code from codeproject. But am unable to login to the FTP server.

    However on manually connecting to the FTP server it gets connected.

    Any help would be appreciated.

     

     

    Thursday, January 17, 2008 4:09 AM
  • Dear NetFresher,

     

       If you use File.Copy(), you will have to take into consideration all the access right related issues that you will face. If is better to use .NET Remoting for copying a file. You can customize it for making it more secure by encrypting the steram using asymmetric cryptography. In .NET remoting you can use file streams and memory streams  and socket communication to transfer the file or you can also use the FTP way. In the FTP way you will require server authentication.

     

    Regards,

    Sandeep A

    ----------------------------------------------------------------------

    [Mark appropriate post(s) as Answer(s)]

     

     

     

    Thursday, January 17, 2008 5:00 AM
  • Sometimes you may need to set ftp as the trusted site. Check with your authentication propertly to get it done.
    Thursday, January 17, 2008 5:58 AM