Subject: connection to external sftp server succeeds in WinSCP but not in UltimateSFTP component
Date: 2010-08-25 21:01:28
From: David Stodola
Source: connection-external-sftp-server-succeeds-winscp-not-ultimatesftp-component
----------------------------------------------------------------------

I am using UltimateSftp_Standard_v2.0.519.2200.

I can successfully connect programmatically using the UltimateSFTP component from my own Windows Vista PC within the company network to an external sftp server using a service id and proxy server (a company proxy server).  I can make the same connection manually using WinSCP.

I can make the same connection manually using WinSCP from a Windows 2003 server.  But taking the same executable using the UltimateSFTP component which works fine on the PC and running it on the server gives an error:

 inError: ComponentPro.Net.SftpException: No such host is known ---> ComponentPro.Net.ProxySocketException: No such host is known ---> System.Net.Sockets.SocketException: No such host is known

   at System.Net.Dns.GetAddrInfo(String name)

   at System.Net.Dns.InternalGetHostByName(String hostName, Boolean includeIPv6)

   at System.Net.Dns.GetHostEntry(String hostNameOrAddress)

   at .Connect(String serverName, Int32 serverPort)

   --- End of inner exception stack trace ---

   at ?.?(IAsyncResult A_0, String A_1, Int32 A_2)

   at ?.?(String A_0, Int32 A_1)

   at ComponentPro.Net.Sftp.?(String A_0, Int32 A_1, ? A_2)

   --- End of inner exception stack trace ---

   at ComponentPro.Net.Sftp.?(String A_0, Int32 A_1, ? A_2)

   at ComponentPro.Net.Sftp.Connect(String serverName)

Have you encountered this before?  Is there some server configuration setting that would allow the connection to succeed in WinSCP but not in your component?


Here's the relevant code:

SftpClient = new Sftp();

WebProxyEx proxy = new WebProxyEx();

proxy.Server = "XX"; // Set proxy server here.

proxy.Port = 8080;

// Set proxy port here.

proxy.UserName =

"XX"; // Proxy user name.

proxy.Password =

"XX"; // Password.

SftpClient.Proxy = proxy;

// Connect to the SFTP server.

SftpClient.Connect(

"XX");

// Authenticate.

SftpClient.Authenticate(

"XX", "XX");

---------------------------------------------------------------------- Note: This question has been asked on the Q&A forum of Thang Dang's fraudulent ComponentPro brand If you purchased anything from ComponentPro, you have been scammed. Contact the payment processor who sold you the license and ask for your money back. Back to ComponentPro Q&A Forum Index