protected bool login()
bool connected = false;
IPEndPoint ip = new IPEndPoint(Dns.Resolve(ftpAddress).AddressList,ftpPort); //PORT = 21
socket.Connect(ip); //The error occurs in this statement
catch (Exception ex)
You can use SocketException.ErrorCode to obtain the specific error code. After you have obtained this code, refer to the Windows Sockets version 2 API error code documentation in the MSDN library for a detailed description of the error.
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)