TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
raven_Hark
NA
2
0
List content of ftp-server
Mar 23 2007 3:38 AM
Hi, I'm writing a real simple program, all it has to do is return the content of a specific ftp-server. But for some reason my List-command do not return any data. My sourcecode: Socket s; string command =""; string user = "anonymous"; string pass = "
[email protected]
"; try { int port = 21; s = new Socket(AddressFamily.InterNetwork , SocketType.Stream, ProtocolType.Tcp); IPHostEntry iphost = Dns.GetHostByName("ftp.uio.no"); ip = iphost.AddressList[0];//ip of the host name IPEndPoint iep = new IPEndPoint(ip , port); s.Connect(iep); Response(); SendRequest(s, "USER " + user + "\r\n"); Response(); SendRequest(s,"PASS " + pass + "\r\n"); Response(); SendRequest(s,"PASV" + "\r\n"); Response(); SendRequest(s,"LIST" + "\r\n"); MessageBox.Show("finale result:"); Response(); } catch(Exception test) { MessageBox.Show("error listing files: " + test.Message); } The response-function works like a charm for user. pass and pasv, but returns no data for the list-command. Hope someone can help me. y.s. -la
Reply
Answers (
0
)
Custom control event
The Windows service application is not working properly