|
#1
|
|||
|
|||
|
Ftp error using the list command
I get this error when I try to list the directory on the server using the LIST command.
425 Unable to build data connection: Invalid argument Thanks, Jonathan Randal
__________________
Blue Wave Software |
|
#2
|
||||
|
||||
|
Post the code you are running.
__________________
I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section. ![]() Please use [Code]your code goes in here[/Code] tags when posting code. Before posting your question, did you look here? Got a question on Linux? Visit our Linux sister site. Modifications Required For VB6 Apps To Work On Vista ![]() Microsoft MVP 2005/2006/2007/2008/2009 |
|
#3
|
|||
|
|||
|
'BEGIN SENDING THE INFORMATION TO THE SERVER
Public Sub SendCommand(ByVal data As String) Const CRLF As String = vbCrLf Dim so As New StateObject Dim buff() As Byte = Encoding.ASCII.GetBytes(data) m_ControlConnection.Send(buff, SocketFlags.None) End Sub Property Command() As String Get Return m_command End Get Set(ByVal value As String) m_command = value SendCommand(value & vbCrLf) End Set End Property Private Function GetData() As String Dim so As StateObject Dim buffer(255) As Byte Dim flags As SocketFlags flags = SocketFlags.None Dim size As Integer = m_ControlConnection.Receive(buffer, 255, SocketFlags.None) Return Encoding.ASCII.GetString(buffer) End Function SUB DATACONNECTION() Command = "LIST /httpdocs" Dim _data As String = GetData() 'ERROR CODE: "425 Unable to build data connection: Invalid argument Debug.WriteLine(_data) ' bind the listening socket to the port Dim info As IPHostEntry = Dns.GetHostEntry(Dns.GetHostName()) Dim ep As New IPEndPoint(info.AddressList(1), port) 'Bind to the local System m_DataConnection.Bind(ep) ' START LISTENING m_DataConnection.Listen(1) 'START ACCEPTING CONNECTIONS FROM THE SERVER Dim mysocket As Socket = m_DataConnection.Accept() END SUB
__________________
Blue Wave Software |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| CUSTOM FTP - LIST COMMAND - What is it File or Folder? | QWERT | .NET | 2 | 10-21-2009 12:22 PM |
| List of Command | Peter_APIIT | C++ | 0 | 08-09-2009 12:44 AM |
| URGENT: FTP Client / Server using RMI | lwinn213 | Java | 2 | 10-23-2008 02:14 PM |
| ListBot Going Out of Business | Larry Rebich | vb.announcements | 1 | 06-28-2001 02:22 PM |