Click here to Skip to main content
15,885,914 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to get a welcome message from FTP server, without login and pass?
Posted
Updated 13-Mar-14 22:01pm
v3
Comments
gggustafson 15-Mar-14 16:40pm    
Please be a little more specific. Are you using FTP within your application? When you ask about a welcome message I would think that you are using a standalone program like FileZilla.
Grom13 18-Mar-14 6:50am    
Yes, I'm using FileZilla. I'm trying to get a greeting from Filezilla in my app (WinForm).
gggustafson 18-Mar-14 12:47pm    
How are you executing FileZilla?
Grom13 19-Mar-14 3:35am    
I launched FileZilla on the local machine. Then in the application settings (FileZilla Server Options) I changed property "Welcome message = Hello world!".

Then in my c# WinForm application I wrote this:
using (TcpClient client = new TcpClient())
{
var result = client.BeginConnect(ftpIP, 21, null, null);
}

When I execute this, FileZilla show in its own window:
(not logged in) (127.0.0.1)> Connected, sending welcome message...
(not logged in) (127.0.0.1)> 220-Hello world!

How to capture in my application ftp-server response?
gggustafson 19-Mar-14 13:12pm    
As far as I know you can't. FileZilla is a standalone Windows application independent from your WinForm application. There are significant restrictions on inter-process communications between independent applications.

You might try executing FileZilla from within your application. The following might help:

C# Process.Start
ProcessStartInfo Class
how to program to integrate with filezilla in C#

You need to provide me with further information as to why you need to do this. Why the standalone FileZilla client on your machine does not suffice. Or why you can't use TcpClient?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900