Welcome to the Xceed Community Sign in | Join | Help
Community Search  

PWD error on a server using virtual directory

Sort Posts: Previous Next
  •  12-13-2007, 4:24 PM Post no. 5286

    PWD error on a server using virtual directory

    I am attempting to download all files in the root folder of an ftp server that uses a virtual directory, but the xceed ftp component is not recognizing the command. Is there some way I can get around this error?


    heres my code

    Public Function DownloadFiles(ByVal strFileMask As String, _

    ByVal strLocalFolder As String) As Integer

    If Not Initialized Then Initialize()

    Dim intVal As Integer = 0



    Dim localFolder As Xceed.FileSystem.DiskFolder

    Dim remoteFolder As Xceed.Ftp.FtpFolder

    Try

    If con Is Nothing Then

    con = New Xceed.Ftp.FtpConnection(m_strServer, m_intPort, m_strUser, m_strPass)

    con.DefaultRepresentationType = m_rtTransferType

    End If

    localFolder = New Xceed.FileSystem.DiskFolder(strLocalFolder)

    remoteFolder = New Xceed.Ftp.FtpFolder(con) ' error occurs here

    remoteFolder.CopyFilesTo(localFolder, False, True, New NameFilter(strFileMask))

    intVal = 1

    Catch ex As Exception

    Debug.WriteLine(ex.ToString())

    intVal = -1

    End Try

    Return intVal

    End Function

    'Exception Thrown

    "Xceed.FileSystem.FileSystemException: An error occurred while getting the starting folder.

    Type: Xceed.Ftp.FtpFolder

    FullName: ---> Xceed.Ftp.FtpReplyException: Invalid reply format to PWD command.

    at Xceed.Ftp.Engine.FtpCommand.EndExecute(IAsyncResult asyncResult)

    at Xceed.Ftp.Engine.FtpCommand.Execute(FtpCommandChannel commandChannel)

    at Xceed.Ftp.FtpClient.GetCurrentFolder(FtpCommandChannel commandChannel, CurrentFolderFtpCommand command)

    at Xceed.Ftp.FtpClient.GetCurrentFolder()

    at Xceed.Ftp.FtpFolder.GetStartingFolder()

    The FTP reply was:

    230 <virtual directory>



    --- End of inner exception stack trace ---

    at Xceed.Ftp.FtpFolder.GetStartingFolder()

    at Xceed.Ftp.FtpFolder..ctor(FtpConnection connection)

    at MedXPress.Service.FTP.DownloadFiles(String strFileMask, String strLocalFolder, String[]& strFileList, String& strResponse) in C:\Documents and Settings\user\My Documents\Visual Studio 2005\Projects\ftpService\FTPClient.vb:line 115"

View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2008 Xceed Software Inc.