VB example Delphi example C# example VB.NET example
To receive a file in memory from an FTP server using the XceedFtp control, you need to perform the following steps. Put an XceedFtp control on a form, or instantiate it dynamically, then:
Specify the FTP server address to connect to. To do this, set the ServerAddress property.
Specify the username to login. Use the UserName property, which is 'Anynomous' by default.
Specify the username's password. Use the Password property, which is 'guest' by default.
Connect to the specified host. To do this, call the Connect method.
Start receiving a file to memory. Call the ReceiveMemoryFile method.
Process the data being received. Write a handler for the ReceivingMemoryFileData event.
Disconnect from the FTP server. Do this by calling the Disconnect method.
Make sure that everything worked properly . To do this, use your language's error handling object or error handling capabilities. The Xceed FTP Library supports standard COM error handling functionality.
Do you want to receive the data in multiple blocks, or just in one single memory chunk? Carefully select the eReceiveMemOptions parameter value when calling the ReceiveMemoryFile method.
Is the FTP server listening on a port other than the usual TCP/IP port 21? If yes, then set the ServerPort property.
The FTP protocol supports "Accounts". Does your FTP server require you to specify an account? If yes, then set the AccountName property or write a handler for the AccountRequired event.