Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
2.1k views
in .NET FTP by
Hi,

I just downloaded edtFTPnet to try it out. I tried to upload a file to my ftp server with the simple code below, but my program just ends up hanging. The Connect() and Close() works fine as I'm able to use the DownloadFile() method that I commented out below to retrieve the file. Can someone kindly help? Thank you in advance.

private void button_Update_Click(object sender, EventArgs e)
{
ftpConnection.Connect();
ftpConnection.UploadFile("test.jpg", "test.jpg");
//ftpConnection.DownloadFile("new1.html", "new1.html");
ftpConnection.Close();
}

1 Answer

0 votes
by (162k points)
You may need to use separate threads if your program is hanging. Or wait for edtFTPnet/PRO, which will support asynchronous operations - it will be released soon.

Hi,

I just downloaded edtFTPnet to try it out. I tried to upload a file to my ftp server with the simple code below, but my program just ends up hanging. The Connect() and Close() works fine as I'm able to use the DownloadFile() method that I commented out below to retrieve the file. Can someone kindly help? Thank you in advance.

private void button_Update_Click(object sender, EventArgs e)
{
ftpConnection.Connect();
ftpConnection.UploadFile("test.jpg", "test.jpg");
//ftpConnection.DownloadFile("new1.html", "new1.html");
ftpConnection.Close();
}

Categories

...