Dear sir,
I am trying to write an FTP class using system.net sockets. I am using XP.
The class never works, it seems that the client always waiting for response
from server. So I try to connect to Remote FTP server using telnet, then I
always get an error of
"425 Can't open data connection
Below are a part of my code, does some one able to tell me what I did wrong/
qqTcpClient = New System.Net.Sockets.TcpClient
Console.WriteLine("I am testing")
Dim Reply As String
Console.WriteLine("connecting")
qqTcpClient.Connect("217.170.3.24", 21)
qqNetworkStream = qqTcpClient.GetStream()
Reply = GetResponse()
Console.WriteLine(Reply)
Console.WriteLine("loging")
SendText("HELP")
' it stops here.
Private Sub SendText(ByVal strMsg As String)
Dim strByte As [Byte]()
strByte = System.Text.Encoding.ASCII.GetBytes(strMsg.ToCharA rray())
qqNetworkStream.Write(strByte, 0, strByte.Length)
End Sub
--
Kind regards
Guoqi Zheng
guoqi AT meetholland dot com
Http://www.meetholland.com