FTP Client using C# csharp

G

Guest

Hi,

I am trying to develop FTP client application using c#.

Our application functinality should be like this:

1.our client uploads files,folders to our ftp server for every 20 minutes.

2.At the end of operation they will put one confirmation file (say Done.txt)
to conirm their upload operation is completed in that cycle.
3.My new FTP client application should login to that ftp server for every 5
minutes and check for

that confirmation file, if it exists then start downloading
files,folders,sub folders they uploaded.
4.The files are large size files and these are in PDF format.

5.After downloading all the files this FTP client application should delete
all those files
folders in that ftp server and create Delete_done.txt file.

6.we are doing that confirmation file checks to to avoid any file clashes.
(while upload/download)


I developed the windows application using c#.
I used the FTP client library found in the following URL.

http://uk.builder.com/programming/windows/0,39026618,39240439,00.htm

but I have some problems with my ftp client application.

when I open the PDF file I downloaded using my windows application it is
giving error as below.

There was an error opening this document. The file is damaged and
could not be repaired .


I found that problem might be the transfer type.
like ascii,binary,image etc.

The ftp client I used in the above url doesn't implement that "TYPE" ftp
command.
I tried to implement as below.

public void setBinaryMode(Boolean mode)
{

if(mode)
{
sendCommand(this.m_state,"TYPE B");
}
else
{
sendCommand(this.m_state,"TYPE A");
}
}

But still I am getting the same pdf file damage error.

Do you guys have any idea why it is giving this error.

You can download that FTP client I used using the following URL

http://techrepublic.com.com/5138-6240-5604375.html

Please help me.

Any kind of help is greatly appreciated.

Thanks
Kumar
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top