EldoS | Feel safer!

Software components for data protection, secure storage and transfer

SFTP Connection Failed

Also by EldoS: Rethync
The cross-platform framework that simplifies synchronizing data between mobile and desktop applications and servers and cloud storages
#2834
Posted: 05/03/2007 08:26:40
by Josh Rogers (Standard support level)
Joined: 05/03/2007
Posts: 7

I am currently testing your SFTP product and I seem to have hit a snag. When I develop a solution whether it be a windows forms or console application if I put the connection code in the main forms code it works fine. However if I add a class library to the solution and build a class specifically for the sftp communications and call the function that has the connection code in it I always get connection failed when calling the open method. There is no further detail of information except for connection failed.

I am using the TElSimpleSFTPClient class. I am lost I am hoping someone can help me.

Thank you,
Josh Rogers
#2835
Posted: 05/03/2007 08:47:22
by Eugene Mayevski (EldoS Corp.)

There can be several reasons for this. The main one is that you don't reference all necessary assemblies.
Some assembly is not found and can't be loaded when needed. I bet you didn't use SecureBlackbox.PKI.dll assembly.


Sincerely yours
Eugene Mayevski
#2836
Posted: 05/03/2007 08:50:32
by Josh Rogers (Standard support level)
Joined: 05/03/2007
Posts: 7

Eugene,

Thank you for your response. I had not referenced SecureBlackbox.PKI but I have now and still no change. However in my windows forms and console applications I had not referenced this dll and the connection was still successful. Anything else I can do?

Thank you,
Josh Rogers
#2837
Posted: 05/03/2007 08:55:46
by Perin Sebastien (Basic support level)
Joined: 06/20/2006
Posts: 8

Hi,
You should have an SFTP error code in the property ErrorCode of SBSimpleSftp.EElSimpleSFTPClientException you should catch

If this error code is 0 the possible issue is the timeout of the connection.

Eugene :
I guess those SFTP error codes are the "SSH Error Codes" listed in the documentation, right ?
What about SecureBlackbox.PKI.dll ? I actually use it, is this not suitable ?

Thanks a lot in advance for your answer
#2838
Posted: 05/03/2007 09:01:19
by Josh Rogers (Standard support level)
Joined: 05/03/2007
Posts: 7

Sperin,

Thank you for your response as well. I have no captured this exception and I am getting an error code of 0, but that makes no sense when I am not getting this error when the ftp code is not in a class library project. If it is in the main form/applications code page then it works just fine. The issue seems to be related to putting it in a class library project of the solution.

Thanks,
Josh Rogers
#2839
Posted: 05/03/2007 09:03:27
by Perin Sebastien (Basic support level)
Joined: 06/20/2006
Posts: 8

So Sorry : I realize there's an SFTP Error Code section in the documentation. So forget my first question :(
#2840
Posted: 05/03/2007 09:13:04
by Perin Sebastien (Basic support level)
Joined: 06/20/2006
Posts: 8

The only advice I can give :
Did you set the SocketTimeout property ?
* If yes get a try with a time out > 3 minutes.
Your call to the SFTP client if it comes from a separate lib could be slower.
Actually the SFTP Error code 0 is just a confirmation that the SSH request is OK.
* If not I think the there's no timeout and your call to SftpClient.Open(); should stand by
#2841
Posted: 05/03/2007 09:14:57
by Eugene Mayevski (EldoS Corp.)

Did you set the license key in your code before calling SecureBlackbox functions?


Sincerely yours
Eugene Mayevski
#2842
Posted: 05/03/2007 09:16:24
by Eugene Mayevski (EldoS Corp.)

I think the problem is not related to SFTP, but is rather a configuration issue like a missing assembly. Please ensure that all assemblies are referenced properly as described in documentation.


Sincerely yours
Eugene Mayevski
#2843
Posted: 05/03/2007 09:32:28
by Josh Rogers (Standard support level)
Joined: 05/03/2007
Posts: 7

I have set the license key and I have these assemblies referenced:

SecureBlackbox
SecureBlackbox.PKI
SecureBlackbox.SFTP
SecureBlackBox.SFTPCommon
SecureBlackbox.SSHCommon

I have gotten this to work with these assemblies, PKI excluded, in other applications. I just can't do it when it is in a class library it seems.

Thank you,
Josh Rogers
Also by EldoS: BizCrypto
Components for BizTalk® and SQL Server® Integration Services that let you securely store and transfer information in your business automation solutions.

Reply

Statistics

Topic viewed 9464 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!