Top DevX Stories
Creating Custom Export Filters for StarOffice with XSLT
WPF Wonders: Using DataTemplates
Crystal Reports Family Offers Options for Developers
Avaya Aura Session Manager video
Avaya Aura Overview video
Search the forums:

Go Back   DevX.com Forums > DevX Developer Forums > .NET

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 10-20-2009, 03:11 PM
QWERT QWERT is offline
Registered User
 
Join Date: Nov 2003
Posts: 108
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
Reply With Quote
  #2  
Old 10-21-2009, 08:36 AM
Hack's Avatar
Hack Hack is offline
Super Moderator
 
Join Date: Apr 2007
Location: Sterling Heights, Michigan
Posts: 7,719
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
Reply With Quote
  #3  
Old 10-21-2009, 12:34 PM
QWERT QWERT is offline
Registered User
 
Join Date: Nov 2003
Posts: 108
'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
Reply With Quote
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

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


All times are GMT -4. The time now is 08:28 AM.


Sponsored Links



Acceptable Use Policy

internet.comMediabistrojusttechjobs.comGraphics.com

WebMediaBrands Corporate Info


Advertise | Newsletters | Feedback | Submit News

Legal Notices | Licensing | Permissions | Privacy Policy


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.