|
Summary
This is the FTP service port number on the FTP server.
Description
The Port property specifies the remote port on the FTP server on which the FTP service resides. Most FTP services listen for connection requests on port 21. Sometimes, usually for security
reasons, port numbers other than 21 are used for FTP connections.
If the application will be connecting to FTP services on a different port, then the Port property must be set before the connection attempt is made. An application may even want to query the user for
the correct port before connecting. The ActiveX control does not verify the setting of the Port property and any value is therefore legal.
If an application prompts the user for the user name and password before connecting to the server, then adding fields to allow the user to enter an optional account name (see the Account property
reference page) and an FTP server port should be provided. If the login parameters are specified at design time, then the local system administrator should be consulted to determine if an account
name or a port other than the default port are required.
This property can be changed at design time and at run time before a connection has been established. The default value for this property is port 21.
Example
FTPClient.Port = 21
Result = FTPClient.Connect ("speedy.distinct.com", "santa", "north pole", "")
If Result = False Then MsgBox "Unable to connect to server", 64, "Sample Program" End If
|