Solved

FTP component

Posted on 1998-02-27
12
470 Views
Last Modified: 2010-08-05
I want to upload files to a FTP server, the "problem" is that the server daemon is running under Windows NT (Microsoft FTP server). Is there any (free) component out there, which is able to upload a file to such a server (Borland's component doesn't do it and some free components also fail but work excellently with unix servers)

Greetings
  Mirko
0
Comment
Question by:Mirko
  • 4
  • 4
  • 2
  • +1
12 Comments
 
LVL 4

Expert Comment

by:itamar
ID: 1359888
Hi Mirko,

very strange ! The company I work for has a project that uses FTP native component from Borland (NetManage) and it works fine with NT server in LAN. Could you be more specific about "doesn't do it", that is, error messages or smth like that.

Anyway, did you try FPiette's components. They are very friendly.
If not, give it a try downloading from:

http://www.rtfm.be/fpiette/indexuk.htm

Bye,
Itamar
0
 

Author Comment

by:Mirko
ID: 1359889
Hi Itamar,

"doesn't do it" means: For instance the sample program does not list any directory entries and no upload is performed (w.o. any error message).
I also tries FPiette's components by testing, if his sample program works and it doesn't: It is always the same (no matter if I use FPiette's component, Borland's component or Tony BenBrahim's component [www.neosoft.com/~startech]):
  - Connect works correctly
  - LogIn works correctly
  - But uploading anything does not work and there is no
    error message: Example: BenBrahim's component: The upload
    starts: There is no progress notification at all, after some
    seconds the upload "completes successfully" no error message
    but also no file on the server.

Behaviour of FPiette's sample program:
  - Connect and LogIn works
  - Pressing any button causes an error:
    "Not a winsock error: 65535"

Borlands sample program:
  - Connect and LogIn works
  - No directory information is shown
  - Upload not possible


I am desperate...

Regards
  Mirko
0
 
LVL 4

Expert Comment

by:itamar
ID: 1359890
Hi Mirko,

I'll check with someone of the team project I mentioned before about NT upload. I remember the first time we made FTP upload with NT we had to change smth in the server.
By now, please, give some details:

1. Are we talking about a specifice server or did you try with more than one ?

2. The server(s) you tried are connected in LAN or Internet ?

3. Can you make an upload with another software in the same NT server. Even Windows FTP or FTP-Explorer can be a good test ?

c.u. tomorrow,

Itamar
0
 

Author Comment

by:Mirko
ID: 1359891
Hello Itamar,

thanx for your fast response.

Here the answers to your questions:

1. I tried more than one server (two)
2. I am connected to the servers via internet.
3. The standard FTP client which ships with Win95 (command line ftp.exe) works well for uploading as well as downloading.

I do not know exactly what type the NT server is, but I have reason to guess that it is part of Microsoft's internet information server package.
Remember: It semms that the server does not send something like an aknowledge signal, because none of the components I tried called the progressnotification procedure.

Sincerly
  Mirko
0
 
LVL 5

Expert Comment

by:ronit051397
ID: 1359892
The NetManage components are OCX's. We are now migrating our sources from OCX to VCL, because we have had many problems, and also the OCX's are slower.
There are freeware components in the Delphi Super Page,
The Winsock and Communications category:
http://sunsite.icm.edu.pl/delphi/
freenet.zip, wsocket.zip, tcpip.zip

0
 
LVL 5

Expert Comment

by:ronit051397
ID: 1359893
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:Mirko
ID: 1359894
Hello Ronit,

I already tired freenet.zip and wsocket.zip (as you can read in the comments above: Fpiette's component is mentioned and Tony BenBrahim's also)...

0
 
LVL 4

Expert Comment

by:itamar
ID: 1359895
Hi Mirko,

I don't know the news I have are good or bad. The project I mentioned earlier works with NT server and it uses version 6.02.1198 of FTP component. We had many problem until we had update the original version of an old Delphi 2. Perhaps it could be your problem, as you didn't mentioned the version of Delphi you're using.  I couldn't try Internet connection, but I'm very certain that it will be ok.

What is very strange is the failure with others components too. I'm working in another small project wher I use FPiette's components and they work very well. Those NT servers you talked about are available for public upload ? If so, I could try with my project and find out some clue.

Bye,
Itamar
0
 

Author Comment

by:Mirko
ID: 1359896
Hello Itamar,

yes, I think it would be a good idea that you would try the upload, but I do not want to post the login password here.
If you wrote me your personal E-Mail address, I would send you the login information.

Bye
  Mirko
0
 
LVL 4

Expert Comment

by:itamar
ID: 1359897
Hi Mirko,

I expected for that. My personal e-mail is: itamar@facil.com

Bye,
 Itamar
0
 

Accepted Solution

by:
DuboisP earned 120 total points
ID: 1359898
You can directly use Internet functions from WININET.DLL
I send you by Mail the Microsoft documentation

Wininet.pas is in Delphi3\source\rtl\win
Wininet.dll comes with Internet Explorer

Here an exemple to get a file

uses Wininet;

var
   hInet, hFTP : HINTERNET;
   hFindHandle : HINTERNET;
   hOpenHandle : HINTERNET;

Begin
   hInet := InternetOpen( ApplicationTitle, 0, NIL, NIL, 0);
   If hInet <> NIL then
   Begin
      // string to connect to a directory server
      sConnectString := Concat( sUser, COMMA, sHpUser, POINT, sHpAccount,    COMMA, sHpDirectory);

      hFTP := InternetConnect( hInet, PChar( sHpHost), Internet_Default_FTP_Port,  PChar( sConnectString), PChar( Crypte( sPassWord)),  Internet_Service_FTP, 0, 0);
      If hFTP = Nil Then
      Begin
         nLen := 1024;
         SetLength( sString, nLen);
         InternetGetLastResponseInfo( nError, PChar( sString), nLen);
         ShowMessage( sString);
         InternetCloseHandle( hInet);
      End
      Else
      Begin
         Screen.Cursor := crHourGlass;
          if FileExists( sLocalFile) then DeleteFile( PChar( LocalFile));

        FTPGetFile( hFTP, PChar( 'SPAI'), PChar( sLocalFile),                  False,  File_Attribute_Normal, Ftp_Transfer_Type_Binary, 0 );
         Begin
            nLen := 1024;
            SetLength( sString, nLen);
            InternetGetLastResponseInfo( nError, PChar( sString), nLen);
            Application.MessageBox( PChar( sString), PChar( ApplicationTitle), mb_OK);
         End;

0
 

Expert Comment

by:DuboisP
ID: 1359899
I have not your E-mail adress !
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Delphi 10 Seattle Dataset Actions 5 78
Help on project with Soap 10 47
Run video youtube webbrowse 10 57
Multiple image collision 13 69
A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now