Home Forums .NET libraries Xceed SFTP/FTP for .NET A connection attempt failed because the connected party did not properly respond after a period of time with SFTP component

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #21482 |

    I am getting the  below error when I tried to connect to the SFTP server using the sample you have provided at

    http://xceed.com/CS/forums/thread/32894.aspx

     The SFTP server used SSH2. The following is the sample code I am using. Can you guide me on how to resolve this error?

    SSHClient sshClient;

    sshClient = new SSHClient();

    sshClient.Connect(“SFTP.companyname.com”, 22);


    sshClient.Authenticate(“user”, “pwd”);

     

    Error Message: 

    A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

    Stack Trace:

     at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
       at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
       at Xceed.SSH.Client.SocketIOProvider.DoConnect()
       at Xceed.SSH.Core.SSHIOManager.DoConnect(SSHConnectionManager connectionManager)
       at Xceed.SSH.Core.SSHConnectionManager.OnConnecting()
       at Xceed.SSH.Client.SSHClientConnectionManager.Connect()
       at Xceed.SSH.Client.SSHClient.Connect(String serverAddress, Int32 port)
       at SFtpExample1.Program.Main(String[] args)

    Applies to Xceed SFTP for .NET. Imported from legacy forums. Posted by Ajay (had 1568 views)

    Diane [Xceed]
    Moderator
    Post count: 1353

    Hi Ajay,

    Are you using the latest version of the component?

    New versions were released a few days ago:
      – v5.3 for .NET 4.0
      – v4.5 for .NET 2.0/3.5

    If not, you can download the latest version from our Updates Center at the following link.

    If you still get the error with the latest version, please set the TraceWriter property so the communication with the SFtp server is logged. Then, please provide us with the log of the session that is giving you problems and we will analyze it. Thank you.

    For example:

       sshClient = new SSHClient();
       sshClient.TraceWriter = new StreamWriter( @”D:\Log\XceedSFtp.log”, true );

       sshClient.Connect(“SFTP.companyname.com”, 22);
       sshClient.Authenticate(“user”, “pwd”);

     

    Applies to Xceed SFTP for .NET. Imported from legacy forums. Posted by Diane [Xceed] (had 941 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.