Problems with IdFtp & c#

Giganews Newsgroups
Subject: Problems with IdFtp & c#
Posted by:  jane (poundli…@gmail.com)
Date: Tue, 12 Sep 2006

Hi,
I am using Indy10.1.5 & C# 2005 Express to write FTP Client functions.
No big problem on getting files from FTP Server, however,
getting trouble when deal with putting files.

my test code is very simple as belllow:
==================================================================
        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                string sFile = "D:\Work\WebPage.xml";
                lFtp.Put(sFile, "", false);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }

==================================================================

the question is:

I CAN NOT send the same file twice!

The first time to run button1_Click would be OK,
however , if I run second times (click button twice)...

the put procedure would be failed, and response some unanalyzable message,
for example, the ex.Message be catched seems like "?T??/R?D?????%"...

no mater the third parameter [AApend] of procedure "IdFtp.put" be false or
true,
I got the same testing result :(

Any sugguestions or ideas?

Thanks!

best regards,
jane.H.U

Replies

In response to

Problems with IdFtp posted by Davo on Mon, 4 Sep 2006