Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
1.8k views
in .NET FTP by (300 points)
We currently use another vendor's FTP component to handle FTP connections and traffic and are in the process of switching to the edtFTPnetPro dll to use a SecureFTPConnection. The current component has a Command property that I use to pass a command string that looks like this: "SITE DEFAULT MAPIN TEXT STY=TEX,CHA=EBCDIC,FIL=DATA,REC=180, BLO=1"

Would the InvokeSiteCommand method accomplish the same thing?

8 Answers

0 votes
by (162k points)
Yes, but omit SITE from the string that you supply as it will be implicitly added when calling InvokeSiteCommand
0 votes
by (300 points)
It should be invoked when you need the command called. Look at the log file to determine if it is sending the right command.
0 votes
by (300 points)
So after the file has been uploaded?
0 votes
by (162k points)
Have a look at the logging of your existing component to find out when it sends the command.

The server log should also tell you the same thing.
0 votes
by (300 points)
Have a look at the logging of your existing component to find out when it sends the command.

The server log should also tell you the same thing.


Looking at the logs, I can't really see where this is getting applied. The FTP "server" we are uploading to is a UNISYS mainframe if that makes any difference. The previous order of operation was:
Create FTP object
Set Server Address
Set UserName and Password
Connect to server
Set remove path
Set FTP object's writeonly Command property.
Set the Local File and Remove File
Call the Upload method.
By that process, it looks like the Command affects the upload. The documentation for this component is lacking in how to get the same functionality. Any assistance would be greatly appreciated.
0 votes
by (162k points)
I would normally expect the SITE command to be applied prior to doing the upload, so try that first. Enable logging at the debug level - you'll see what commands are being sent in the log.
0 votes
by (300 points)
I would normally expect the SITE command to be applied prior to doing the upload, so try that first. Enable logging at the debug level - you'll see what commands are being sent in the log.


What gets passed in the strings array of the InvokeSiteCommand? Is it the remote file name? I tried sending nothing but that caused an Object not set error.
0 votes
by (162k points)
No, I assume you need to pass in the same SITE command as your previous program was doing:

InvokeSiteCommand("DEFAULT MAPIN TEXT STY=TEX,CHA=EBCDIC,FIL=DATA,REC=180, BLO=1");

Categories

...