EldoS | Feel safer!

Software components for data protection, secure storage and transfer

EElSimpleSFTPClientException

Also by EldoS: RawDisk
Access locked and protected files in Windows, read and write disks and partitions and more.
#3987
Posted: 10/10/2007 07:16:44
by  Richard Price
I have an application that calls a class library containing all the routines to SFTP. It runs perfectly. The same code when called from a web service does not run, its driving me crazy.

The error that I am getting is:

DownloadResults Open: Connection failed
DownloadResults : SBSimpleSftp.EElSimpleSFTPClientException: Connection failed
at SBSimpleSftp.TElSimpleSFTPClient.Open()
at TRS.SFTP.DownloadResults(String strFileToDownload) in C:\TRS\TRS\TRS\SFTP\SFTP.vb:line 28

The code is pasted below:

Please can you help me.

Sincerely,
Richard.



Public Sub DownloadResults(ByVal strFileToDownload As String)

Dim fsErrors As FileStream
Dim streamValidation As StreamWriter

fsErrors = New FileStream(My.Settings("FTPerrorsPath") & "errors.txt", FileMode.Create, FileAccess.Write)
streamValidation = New StreamWriter(fsErrors)

SBUtils.Unit.SetLicenseKey("0190...773A")

Client = New TElSimpleSFTPClient
Client.Address = My.Settings("SFTPdomain")
Client.Port = Int32.Parse(My.Settings("SFTPport"))
Client.Username = My.Settings("SFTPuserName")
Client.Password = My.Settings("SFTPpassword")

Try

Client.Open()

Catch ex As Exception

streamValidation.WriteLine("DownloadResults Open: " & ex.Message)
' streamValidation.WriteLine("DownloadResults : " & ex.InnerException.ToString)
streamValidation.WriteLine("DownloadResults : " & ex.GetBaseException.ToString)

streamValidation.Close()
fsErrors.Close()
Client.Close(False)
Exit Sub
End Try

Try
Client.DownloadFiles("/result_download", strFileToDownload, My.Settings("FSAresults"), TSBSFTPFileTransferMode.ftmOverwrite, False, TSBSFTPCaseConversion.sccNone, True)
Catch ex As Exception
streamValidation.WriteLine("DownloadResults DownloadFiles: " & ex.Message)
streamValidation.Close()
fsErrors.Close()
Client.Close(False)
Exit Sub
End Try

Client.Close(False)
streamValidation.Close()
fsErrors.Close()
End Sub
#3988
Posted: 10/10/2007 07:30:22
by Eugene Mayevski (EldoS Corp.)

The problem is not related to SFTP, but most likely to access permissions. When you call Open method, it internally uses some classes from SecureBlackbox.SFTPCommon, SecureBlackbox.SSHClient, SecureBlackbox.SSHCommon, SecureBlackbox.PKI and SecureBlackbox assemblies. It's likely that some of those assemblies are not available (not copied/installed properly) or not accessible (due to security permissions) or can't be loaded due to the same security permissions. The latter applies to SecureBlackbox.PKI which includes some P/Invoke calls.


Sincerely yours
Eugene Mayevski
#14311
Posted: 08/27/2010 20:36:48
by Deepa V (Basic support level)
Joined: 08/26/2010
Posts: 5

Hi Eugene,

I am having a similar problem, where in my .NET application has multiple "Connection Failed" intermittently.

please refer to my thread below:
https://www.eldos.com/forum/read.php?FID=7&TID=2630&MID=14304#message14304


I have multiple threads hitting the secure black box dlls at the same time, so is this a concern and maybe a cause for the "Connection Failed" exception from SBSimpleSftp.EElSimpleSFTPClientException ?
#14312
Posted: 08/28/2010 02:19:39
by Eugene Mayevski (EldoS Corp.)

No, your problem is different. Let's continue in your original thread.


Sincerely yours
Eugene Mayevski

Reply

Statistics

Topic viewed 2563 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!