FTPImplicit login - WeOnlyDo Discussion board

FTPImplicit login (General questions)

by gnudarve, Wednesday, February 09, 2005, 18:36 (7024 days ago)

Im having trouble logging to a Secure FTP server using implicit. Can you please send me example code for requesting a server certificate, accepting it and logging in?

Thanks

Re: FTPImplicit login

by wodSupport, Wednesday, February 09, 2005, 19:59 (7023 days ago) @ gnudarve

Hi.

What kind of trouble do you have? Server's certificate is accepted by default. Basically, all you need to do is set Protocol = FTPSimplicit, and possibly Port = 990 (or something else) and try to connect.

Does that work? If not, where exactly does it fail?

Re: FTPImplicit login

by Jessica, Wednesday, February 16, 2011, 19:44 (4825 days ago) @ wodSupport

Hi.

What kind of trouble do you have? Server's certificate is accepted by default. Basically, all you need to do is set Protocol = FTPSimplicit, and possibly Port = 990 (or something else) and try to connect.

Does that work? If not, where exactly does it fail?

We have the same issue. Successfully connected using Protocol = FTPSimplicit, and possibly Port = 990 but not able to putfile/putfiles

Re: FTPImplicit login

by woddrazen, Wednesday, February 16, 2011, 19:46 (4825 days ago) @ Jessica

Hi Jessica,


Can you maybe show us your PutFile code snippet?

Please make sure that you always use full, absolute local and remote path in PutFile Method.


Regards,
Drazen

Re: FTPImplicit login

by Jessica, Wednesday, February 16, 2011, 19:58 (4825 days ago) @ woddrazen

I use wodFTPDLX.PutFiles LocalPath, RemotePath, 1

LocalPath = C:Data and RemotePath = /

wodFTPDLX.PutFiles LocalPath, RemotePath, 1 errored out and files not sent

LocalPath = C:Data est.txt and RemotePath = /
wodFTPDLX.PutFile LocalPath, RemotePath, 1 errored out and the file was not sent

I tried wodFTPDLX.MoveFile LocalPath+ * , C:Archive worked OK.

Thanks!

Re: FTPImplicit login

by woddrazen, Wednesday, February 16, 2011, 20:20 (4825 days ago) @ Jessica

Jessica,


Did your received some error maybe?

Also, are you sure that you are using correct remote path? Do you have some sub folder maybe where you should upload your files?

Something like this:
[code]wodFTPDLX.PutFiles c:\Data, /home/somefolder , 1[/code]
Drazen

Re: FTPImplicit login

by jessica, Wednesday, February 16, 2011, 20:33 (4825 days ago) @ woddrazen

I am sure about the remote directory. Tried Filezilla before noticing WOD might support implicit.

Error logged after connected successfully:
220; 220 Xlight FTP Server 3.6 ready... USER xxxx: 331; 331 Password required for xxxx PASS xxxx: 230; 230 Login OK FEAT: 211; 211-Features supported REST STREAM EPRT EPSV SIZE MDTM MFMT AUTH PBSZ PROT MLST type*;size*;modify*; MLSD 211 End PWD: 257; 257 / PBSZ 0: 200; 200 PBSZ=0 PROT P: 200; 200 PROT command OK TYPE I: 200; 200 Type set to I. CWD /test.txt: 550; 550 Can't change directory to /test.txt . CWD /: 250; 250 Directory successfully changed PASV: 227; 227 Entering Passive Mode (10,10,1,1,23,157)

Thanks!

Re: FTPImplicit login

by woddrazen, Wednesday, February 16, 2011, 20:37 (4825 days ago) @ jessica

Jessica,


Did you received some error maybe?

What happens if you try to do same using our samples? You can find sample sin component Samples folder.


Drazen

Re: FTPImplicit login

by jessica, Wednesday, February 16, 2011, 21:36 (4825 days ago) @ woddrazen

I tried using C:Program FilesWeOnlyDo.comFtpDLXSamplesVBComponent1. Simple with FTPSimplicit as protocol, blocking and passive.

When I click connect, there were a few statechange logs.

When I selected the file to upload and click putfile, I got the msgbox with Runtime error 30003 component busy .
By clicking Debug, I was lead to the function

Private Sub Command10_Click()
PS1.Value = PS1.Min
Ftp1.PutFile
End Sub

Thanks!

Re: FTPImplicit login

by woddrazen, Wednesday, February 16, 2011, 22:48 (4825 days ago) @ jessica

Jessica,


I just tired to run Xlight FTP Server 3.6 on my side and wodFtpDLX PutFiles worked without any problem.

Can you please try this simple code and if error occur send us output from FtpReply Event:
[code]Dim WithEvents dlx1 As wodFtpDLXCom
Private Sub Form_Load()
Set dlx1 = New wodFtpDLXCom

dlx1.HostName = your_hostname
dlx1.Blocking = True
dlx1.Protocol = FTPSimplicit
dlx1.Login = your_login
dlx1.Password = your_password
dlx1.Passive = True
dlx1.Connect

dlx1.PutFiles c:\Data , /
End Sub

Private Sub dlx1_FTPReply(ByVal Command As String, ByVal ReplyCode As Integer, ByVal ReplyText As String)
Debug.Print Command & & ReplyText
End Sub[/code]
Please also send us full log from FileZilla successful upload. So we can compare it with wodFtpDLX.

You can send that data to techsupport@weonlydo.com


Drazen

Re: FTPImplicit login

by jessica, Wednesday, February 16, 2011, 23:23 (4825 days ago) @ woddrazen

220 Xlight FTP Server 3.6 ready...
USER xxxxx 331 Password required for xxxxx
PASS xxxxx 230 Login OK
FEAT 211-Features supported
REST STREAM
EPRT
EPSV
SIZE
MDTM
MFMT
AUTH
PBSZ
PROT
MLST type*;size*;modify*;
MLSD
211 End
PWD 257 /
PBSZ 0 200 PBSZ=0
PROT P 200 PROT command OK
TYPE I 200 Type set to I.
CWD /test.csv 550 Can't change directory to /test.csv .
CWD / 250 Directory successfully changed
PASV 227 Entering Passive Mode (10,10,1,1,23,123)

Error message Runtime Error 10060 the current connection has time out .


Filezilla full message:
Status: Resolving address of ftp.xxxx.com
Status: Connecting to xxx.xxx.xxx.xxx:990...
Status: Connection established, initializing TLS...
Status: Verifying certificate...
Status: TLS/SSL connection established, waiting for welcome message...
Response: 220 Xlight FTP Server 3.6 ready...
Command: USER xxxxx
Response: 331 Password required for xxxxx
Command: PASS xxxxx
Response: 230 Login OK
Command: SYST
Response: 215 UNIX Type: L8
Command: FEAT
Response: 211-Features supported
Response: REST STREAM
Response: EPRT
Response: EPSV
Response: SIZE
Response: MDTM
Response: MFMT
Response: AUTH
Response: PBSZ
Response: PROT
Response: MLST type*;size*;modify*;
Response: MLSD
Response: 211 End
Command: PBSZ 0
Response: 200 PBSZ=0
Command: PROT P
Response: 200 PROT command OK
Status: Connected
Status: Retrieving directory listing...
Command: PWD
Response: 257 /
Command: TYPE I
Response: 200 Type set to I.
Command: PASV
Response: 227 Entering Passive Mode (10,10,1,1,23,133)
Status: Server sent passive reply with unroutable address. Using server address instead.
Command: MLSD
Response: 150 Opening ASCII mode data connection for MLSD (115 bytes).
Response: 226 Transfer complete (0.456 KB/s).
Status: Directory listing successful
Status: Resolving address of ftp.xxxxx.com
Status: Connecting to xxx.xxx.xxx.xxx:990...
Status: Connection established, initializing TLS...
Status: Verifying certificate...
Status: TLS/SSL connection established, waiting for welcome message...
Response: 220 Xlight FTP Server 3.6 ready...
Command: USER xxxxx
Response: 331 Password required for xxxxx
Command: PASS xxxxx
Response: 230 Login OK
Command: PBSZ 0
Response: 200 PBSZ=0
Command: PROT P
Response: 200 PROT command OK
Status: Connected
Status: Starting upload of C:Data est.txt
Command: CWD /
Response: 250 Directory successfully changed
Command: PWD
Response: 257 /
Command: TYPE A
Response: 200 Type set to A.
Command: PASV
Response: 227 Entering Passive Mode (10,10,1,1,23,197)
Status: Server sent passive reply with unroutable address. Using server address instead.
Command: STOR test.txt
Response: 150 Opening ASCII mode data connection for test.csv.txt.
Response: 226 Transfer complete (0.627 KB/s).
Status: File transfer successful, transferred 0 bytes in 1 second
Status: Retrieving directory listing...
Command: TYPE I
Response: 200 Type set to I.
Command: PASV
Response: 227 Entering Passive Mode (10,10,1,1,23,178)
Status: Server sent passive reply with unroutable address. Using server address instead.
Command: MLSD
Response: 150 Opening ASCII mode data connection for MLSD (180 bytes).
Response: 226 Transfer complete (0.672 KB/s).
Status: Directory listing successful

Re: FTPImplicit login

by woddrazen, Wednesday, February 16, 2011, 23:43 (4825 days ago) @ jessica

Jessica,


What happens if you set StrictHost Property to True before Connect Method?

More help for StrictHost Property you can find here:
http://www.weonlydo.com/FtpDLX/Help/wodFtpDLX-StrictHost.html


Drazen

Re: FTPImplicit login

by jessica, Thursday, February 17, 2011, 00:34 (4825 days ago) @ woddrazen

That worked like a champ! Thank you so much for your help!

Re: FTPImplicit login

by jessica, Thursday, March 03, 2011, 01:43 (4811 days ago) @ jessica

I got new problem here. I use that function to make a component. It failed sending all the files at a time if the total size is larger than 500K. And I tried to send multiple times with 3 mins interval. However, the component sometimes hang. I have to shutdown the component which even freezing the whole COM.
Do you have any thoughts?

Thanks!

Re: FTPImplicit login

by woddrazen, Thursday, March 03, 2011, 09:35 (4811 days ago) @ jessica

Jessica,


What happens if you try same our samples?

Also, do you use maybe Sleep API in your code? If you do, please remove it because it blocks same thread where wodFtpDLX lives in.


Drazen