FTP+SSL and login. (wodFtpDLX / wodFtpDLX.NET)
Evaluating the product, and the lic is soon to expire. The server I'm using is Ipswitch WS_FTP server (on my desk) and prototype with VB.
We're using a signed cert on the client together with user/pass on the server. What's missing here... ?
The wodFtpDLX1_StateChange reports:
Connecting to server
Initializing secure connection
Disconnected from server
There's no problem when I use the ws_ftp client - cert and password is valid..
Set wodFtpDLX1 = New wodFtpDLX
Set theCert = New Certificate
theCert.LoadKey C:Certsws_ftp_test_mot_pc46172.key , test
theCert.Load C:Certsws_ftp_test_mot_pc46172.crt , test
wodFtpDLX1.Authentication = authBoth
Set wodFtpDLX1.Certificate = theCert
wodFtpDLX1.HostName = 10.23.24.226
wodFtpDLX1.Login = xxx
wodFtpDLX1.Password = xxx
wodFtpDLX1.Port = 20
wodFtpDLX1.Connect
Any help....
Re: FTP+SSL and login.
Ronny,
perhaps setting Ftp1.Blocking=True will help? Can't tell more since I don't see whole code, but that could be it.
Re: FTP+SSL and login.
Ronny,
perhaps setting Ftp1.Blocking=True will help? Can't tell more since I don't see whole code, but that could be it.
Did not change the situation..
I'll install Etherreal and see what comes up...
Complete code:
Option Explicit
Dim WithEvents wodFtpDLX1 As wodFtpDLX
Dim theCert As Certificate
Private Sub Command1_Click()
On Error GoTo feil
Set wodFtpDLX1 = New wodFtpDLX
Set theCert = New Certificate
theCert.LoadKey C:\Certs\ws_ftp_test_mot_pc46172.key , test
theCert.Load C:\Certs\ws_ftp_test_mot_pc46172.crt , test
Debug.Print theCert.Text
'wodFtpDLX1.Authentication = authCertificate
wodFtpDLX1.Authentication = authBoth
Set wodFtpDLX1.Certificate = theCert
wodFtpDLX1.HostName = 10.23.24.226
wodFtpDLX1.Login = xxx
wodFtpDLX1.Password = xxx
wodFtpDLX1.Port = 20
'wodFtpDLX1.Protocol = wodFtpDLXLib.ProtocolsEnum.FTP
'wodFtpDLX1.Protocol = wodFtpDLXLib.ProtocolsEnum.FTPSnodata
wodFtpDLX1.Protocol = wodFtpDLXLib.ProtocolsEnum.FTPSwithdata
'wodFtpDLX1.Protocol = wodFtpDLXLib.ProtocolsEnum.FTPSimplicit
wodFtpDLX1.StrictHost = False
' wodFtpDLX1.Passive = True
wodFtpDLX1.Blocking = True
wodFtpDLX1.Connect
Exit Sub
feil:
List1.AddItem Err.Description & vbCrLf & Err.Number
Set wodFtpDLX1 = Nothing
Set theCert = Nothing
End Sub
Private Sub Command2_Click()
On Error GoTo feil
wodFtpDLX1.ListDir
Exit Sub
feil:
List1.AddItem Err.Description & vbCrLf & Err.Number
End Sub
Private Sub Command3_Click()
' Testing standard FTP - internal server
On Error GoTo feil
Set wodFtpDLX1 = New wodFtpDLX
wodFtpDLX1.Authentication = authPassword
wodFtpDLX1.HostName = vebt1553
wodFtpDLX1.Login = ronny
wodFtpDLX1.Password = ronny
wodFtpDLX1.Protocol = wodFtpDLXLib.ProtocolsEnum.FTP
wodFtpDLX1.Connect
Exit Sub
feil:
List1.AddItem Err.Description & vbCrLf & Err.Number
Set wodFtpDLX1 = Nothing
End Sub
' Reset objects
Private Sub Command4_Click()
On Error Resume Next
wodFtpDLX1.Disconnect
Set wodFtpDLX1 = Nothing
Set theCert = Nothing
End Sub
Private Sub Form_Load()
List1.Clear
End Sub
Private Sub Form_Unload(Cancel As Integer)
On Error Resume Next
Command4_Click
End Sub
Private Sub wodFtpDLX1_Connected(ByVal ErrorCode As Long, ByVal ErrorText As String)
Debug.Print Connected
List1.AddItem > Connected > & ErrorText
End Sub
' State changes
Private Sub wodFtpDLX1_StateChange(ByVal OldState As wodFtpDLXLibCtl.StatesEnum)
On Error Resume Next
Debug.Print State changed to & wodFtpDLX1.StateText
List1.AddItem State : & wodFtpDLX1.StateText
End Sub
Re: FTP+SSL and login.
Interesting change in the situation...
Changing
wodFtpDLX1.Login = xxx
wodFtpDLX1.Password = xxx
wodFtpDLX1.Protocol = wodFtpDLXLib.ProtocolsEnum.FTPSnodata
wodFtpDLX1.Port = 20
wodFtpDLX1.StrictHost = False
wodFtpDLX1.Passive = True
wodFtpDLX1.Blocking = True
wodFtpDLX1.Connect
to
wodFtpDLX1.Login = xxx
wodFtpDLX1.Password = xxx
wodFtpDLX1.Protocol = wodFtpDLXLib.ProtocolsEnum.FTPSnodata
wodFtpDLX1.StrictHost = False
wodFtpDLX1.Passive = True
wodFtpDLX1.Blocking = True
wodFtpDLX1.Port = 20
wodFtpDLX1.Connect
(Only the PORT property is changed).
The state change from wodFtpDLX1_StateChange is now:
State Connecting to server
State Initializing secure connection
State Setting data channel security
State Sending authentication data
State Connected to server - idle
State Downloading directory list from the server
State Setting transfer mode
State Changing current directory
State Downloading directory list from the server
State Getting secondary data channel
State Downloading directory list from the server
.. and from here it seems that the component is busy all the time..
At least I'm having a small progress...
Re: FTP+SSL and login.
Ronny,
so what error do you get?
Re: FTP+SSL and login.
Ronny,
so what error do you get?
It was just hanging - and it cooked down to the fact that I've used the wrong protocol.
I've switched to FTPSwithdata and it's now working like a dream.
There is a minor problem - every now and then (twise today) I get the message 'Duplicate definition' from VB - and I have to remove and insert the ocx on the form to get back to work...
For me - it makes me wonder about the product...
Still - have some more tests to do before we (probably) buy the package.
One positive thing is the quick response when we meet the wall - it really help me to decide which product to go for...
Ronny.
Re: FTP+SSL and login.
Hmm, duplicate definition doesn't sound like our error. How many (our?) components did you have on the form?
Does it happen with our sample apps too? We didn't have reports about something like that so far, so I have to see what could be causing it. More info about it would be appreciated.
Regards,
Kreso