Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
7.2k views
in .NET FTP by (800 points)
Hi,

I downloaded the latest version and trying to implement it now.. This is the way I am doing:

ftpConnection1.ServerAddress = "XXXXXXXX";
ftpConnection1.UserName = "XXXXX";
ftpConnection1.Password = "XXXX";
ftpConnection1.Connect();
ftpConnection1.Site = "lrecl=66 blksize=27984 recfm=fb";
ftpConnection1.ChangeWorkingDirectory("C:\\bn");
ftpConnection1.UploadFile(@"C:\EIS_FTP\OUTBOX\amfm.catslocn.cen",@"TUE0FZZ7");
ftpConnection1.Close();

I am getting this run time error for ChangeWorkingDirectory:

An unhandled exception of type 'EnterpriseDT.Net.Ftp.FTPException' occurred in edtftpnet.dll Additional information: A qualifier in "C:\bn" contains an invalid character

Also getting this compilation error for Site:

Cannot implicitly convert type

13 Answers

0 votes
by (162k points)
ChangeWorkingDirectory is a directory on the server so C:\\bin doesn't exist.

As for site, I think you are looking for InvokeSiteCommand.
0 votes
by (800 points)
Thanks for quick response...It's working fine.
0 votes
by (800 points)
One more help Bruce. I want to set Connection Type(Active/PASV) from my coding. I can't use ftpConnection1.ConnectMode as this is not meant for that and I am not able to get any more option also... Please help to write this also.

Many Thanks,
Lita
0 votes
by (800 points)
If I give it like this:

ftpConnection1.ConnectMode ="PASV";
I am getting the following error:

Cannot implicitly convert type
0 votes
by (51.6k points)
Try this:
ftpConnection1.ConnectMode = FTPConnectMode.PASV


- Hans (EDT)
0 votes
by (800 points)
Hi,
THanks and now finally I am able to do it successfully....but one more issue:

One file having 17MB size is giving this error:

Unable to write data to the transport connection.

NOTE: I am able to FTP a 19MB file.

Please help..

Thanks & Regards,

Lita.
0 votes
by (800 points)
Also all the files are using same type of connection, same server, same user id ...everything same. And files are all data files and I am using ASCII mode to FTP. But, it's giving this error only for one file which I am able to FTP successfully from my command prompt, but not through my application.
Note: I am sending these files to a mainframe m/c.

Quick reply will be highly appreciated.........there is a long vacation from today and if I get the answer now then I can leave ontime else I will be here all alone working. :)

Many Thanks.........

Lita
0 votes
by (162k points)
You'll need to post a small section of the log file (no more than 10 lines) which shows the problem.
0 votes
by (800 points)
Sorry Bruce, but I don't have any idea about the log file you are talking about. Can you please guide me to get this?
0 votes
by (162k points)
see the Dev Guide or try

using EnterpriseDT.Util.Debug;

Logger.CurrentLevel = Level.DEBUG;
Logger.AddAppender(new FileAppender("myfile"));

Categories

...