The short answer is - set the port number after you set the protocol. This only necessary because you are trying to use the FTP port for SFTP, which is not really normal.
Here's the long anwer: As you probably know, port 21 is the standard port for FTP and port 22 is the standard port for SFTP. We have some smarts in the SecureFTPConnection.Protocol setter that will change the port number in certain cases. For example, if the Protocol is FTP and the port is 21 when you set the Protocol to SFTP then it will change the port to 22. But if, for example, the port has been set to 12,345 then it will not be changed regardless of how you set the Protocol property.
- Hans (EnterpriseDT)