Error Invalid socket or not connected... - WeOnlyDo Discussion board

Error Invalid socket or not connected... (General questions)

by condev1972, Saturday, March 18, 2006, 18:18 (6824 days ago)

Hello,
I'm using FtpDLX 2.5.6 ( GUI ) component on a Delphi 5 form
on WinXP Pro SP2, with Firewall(s) disabled.
The component has all designtime properties set correctly
to connect to a local FileZilla FTP server (hostname has
the local IP, Login and Password are set; Protocol is FTP ;
no proxy.
When I start my small demo and call Connect method, I only
get an error message Invalid socket or not connected... .
When trying to connect to a FTP server on a local network I
get an connection refused error although the FTP server
does not even receive any connection try.
With a tool PortExplorer I did not detect any outbound
connection try of my program.

What could be the cause for this error?

It's a little disturbing that a simple connect won't even
work whereas other FTP tools do work fine (as within
Total Commander).

Please help,
Tobias

Re: Error

by wodDrazen, Saturday, March 18, 2006, 18:27 (6824 days ago) @ condev1972

Hi Tobias,

Sometimes Delphi use internal Connect method for something else, in which case he renames our Connect to Connect1.
Can you check if there's Connect1 method and try it?

Let us know how it goes.

Regards,
Drazen

Re: Error

by condev1972, Saturday, March 18, 2006, 18:40 (6824 days ago) @ wodDrazen

Sometimes Delphi use internal Connect method for something else, in which case he renames our Connect to Connect1.

Hello Drazen,
thanks for your fast reply. No, the Connect1 is not there.
It seems as if I'm having a problem with my Delphi since I can
only connect to my local network FTP server when running my demo
app outside Delphi (even with Firewall disabled).
Seems I'll have to play around a little more, shouldn't be a
FtpDLX problem, but maybe you've heard about something similar
and know about this issue?

Thanks a lot again,
Tobias

Re: Error

by wodDrazen, Saturday, March 18, 2006, 18:52 (6824 days ago) @ condev1972

Hi Tobias,

You can send us code snippet to try to duplicate your problem if problem is in your code.

Maybe you are trying to connect to server with some other protocol or port.
Can you telnet your server with port that you are trying to connect?

Hope I helped.

Drazen

Re: Error

by condev1972, Saturday, March 18, 2006, 19:06 (6824 days ago) @ wodDrazen

I'm new to SFTP/FTPS and probably mixed up some setting
combinations (FileZilla is FTPS, not SFTP it seems?).

I'm in need of help anyway: can you point me to a good
source about how a certificate is usually (from my customer
point of view) generated? Is the certificate file that I can
generate with FileZilla the same I have to use for the
Certificate property of FtpDLX? If not, where does it come
from?

Thanks a lot again.

Cheers,
Tobias


Re: Error

by wodAlan, Saturday, March 18, 2006, 22:08 (6824 days ago) @ condev1972

Hi Tobias,

Did you mean under Certificate login to server with Private/Public key?
I cannot be sure that our and Filezilla Certificate are same.
You can send FIlezilla Certificate to us and we will tested with our component.
Please send to techsupport@weonlydo.com

Regards,
Alan

Re: Error

by condev1972, Sunday, March 19, 2006, 04:25 (6824 days ago) @ wodAlan

Did you mean under Certificate login to server with Private/Public key?

Actually the question was more in general: where do certificates
come from? Somebody has to generate them in the first place. :-)

Why/when should I use the ICertificate object as a client
application to generate my own keys? Shouldn't these always
be generated by my customer's FTP administrators? If this is
the case, my application would just need to be told where
the certificate file is located by my application's end-user
and I load it before connecting, right?

Thanks,
Tobias

Re: Error

by wodDrazen, Sunday, March 19, 2006, 17:41 (6823 days ago) @ condev1972

Hi Tobias,

Authentication with Certificate private/public key work in way that user load his login and private key before connecting to server and server has user public key and that is how he recognize user.
In your application you only need to load USER private key, private key that he already generate it.

Here is example:

-------------
Dim Ftp1 as new wodFtpDLX
Dim cert as new wodCertificate

Set Ftp1.Certificate = cert

cert.LoadKey App.Path & mykey.txt
cert.Load App.Path & mykey.txt

Ftp1.HostName = your_server
Ftp1.Authentication = authCertificate
Ftp1.Login = something
Ftp1.Protocol = SFTP

Ftp1.Connect
--------------


Hope I helped.

Regards,
Drazen

Re: Error

by condev1972, Tuesday, March 21, 2006, 19:58 (6821 days ago) @ wodDrazen

Hello Drazen,

thanks for the example, so I do have to create and use an
instance of the certificate component, right? I just can't
use the FtpDLX-com object's Load method to load a certificate
from file? Just curious.

Btw, I had to restore an old image of my development machine
system (windows) partition and suddenly find my Delphi
environment no longer producing strange errors when using
FtpDLX within its debugger.
Shortly said: my actual problem, I started this thread with,
is resolved. [:happy:]

Thanks for all your help & insight, appreciate it a lot.
[:wink:]

Regards,
Tobias