Solved

FTP component

Posted on 1998-02-27
12
462 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
0
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 

Author Comment

by:Mirko
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
I have not your E-mail adress !
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

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…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

772 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

15 Experts available now in Live!

Get 1:1 Help Now