Home Forums .NET libraries Xceed SFTP/FTP for .NET Transfer MODE S

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #21343 |

    Hi,

    I am using ur FTP DLL to connect to our FTP.

    We get error on Transfer Mode command MODE S.The error we get when this command is called was “502 Command not implemented”.

    How can we avoid using this command and avoid this error?

    i get this exception in the event m_asyncFtpClient_ReplyReceived.

     

    Here is  events invoked in my code

     

     Private Sub _oAsyncFtpClient_CommandSent(ByVal sender As Object, ByVal e As Xceed.Ftp.CommandSentEventArgs) Handles _oAsyncFtpClient.CommandSent

            ‘ We want to log every commands sent to the FTP server.

            AddConnectionLogInformation(“> ” + e.Command)

        End Sub

     

     Private Sub m_asyncFtpClient_ReplyReceived(ByVal sender As Object, ByVal e As Xceed.Ftp.ReplyReceivedEventArgs) Handles _oAsyncFtpClient.ReplyReceived

            ‘ We want to log every reply received from the FTP server.

            AddConnectionLogInformation(e.Reply.ToString())

        End Sub

     

    Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by Arun (had 1543 views)

    Xceed Support
    Member
    Post count: 5658

    Hi Arun,

    Can you set the TraceWriter property so we can get a log of the communication with the server?

    FtpClient.TraceWriter = new StreamWriter( @”D:\ftp.log”, true );

    Can you also provide the relevant code snippet that your are using to do the transfer?

    Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by Marc [Xceed] (had 212 views)

    User (Old forums)
    Member
    Post count: 23064

    Hi,

    In the log I am getting error > MODE S  502 Command not implemented

    here is the code that i use for Transfer mode
     

     Private Sub Login()
            Try
                _oAsyncFtpClient.BeginLogin(_sUserName, _sPassword, New AsyncCallback(AddressOf Me.LoginCompleted), Nothing)
            Catch x As Exception
                HandleExceptions(“An error occured while trying to login.  ” & “Function:Login”, x, True)
            End Try
        End Sub

      Private Sub LoginCompleted(ByVal asyncResult As IAsyncResult)
            Try
                _oAsyncFtpClient.EndLogin(asyncResult)

                ChangeTranserMode()

            Catch x As Exception
                HandleExceptions(“An error occured while trying to login.  ” & “Function:LoginCompleted”, x, True)
            End Try
        End Sub 

     Private Sub ChangeTranserMode()
            Try
                Dim transferMode As TransferMode

                _oAsyncFtpClient.BeginChangeTransferMode(transferMode, New AsyncCallback(AddressOf Me.ChangeTranserModeCompleted), Nothing)
            Catch x As Exception
                HandleExceptions(“An error occured while trying to change transfer mode.  ” & “Function:ChangeTranserMode”, x, True)
            End Try
        End Sub

    Private Sub ChangeTranserModeCompleted(ByVal asyncResult As IAsyncResult)
            Try
                _oAsyncFtpClient.EndChangeTransferMode(asyncResult)

                _bConnected = True
                RaiseEvent Connected()
            Catch x As Exception
                HandleExceptions(“An error occured while trying to change transfer mode.  ” & “Function:ChangeTranserModeCompleted”, x, True)
            End Try
        End Sub

    Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by Arun (had 272 views)

    Xceed Support
    Member
    Post count: 5658

    Hi Arun,

    So that I may investigate in greater detail for you, can you attach a copy of the log so that we can see when the error occurs?

    Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by Marc [Xceed] (had 424 views)

    User (Old forums)
    Member
    Post count: 23064

    Hi,

    We can’t change the code to add trace like this since it is running on our LIVE system.

    Can you please help on this .

    We still have this issue.the new one we get while connecting to another FTP server is

    MODE S  500 ‘MODE’: command not understood.
    I know from documentation that MODE S is to set the transfer mode as ‘Stream’.
    Why some FTP server doesn’t know this command?Is it something to do with Passive/Active mode?
    What mode is the default -Passive or Active?

    We purchased the new support licence today for get quick response on this from you
     

    Thanks

    Arun

    Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by Arun (had 230 views)

    Xceed Support
    Member
    Post count: 5658

    Hi Arun,

    Since you have renewed your Vanguard subscription, it would benefit you to email support directly (support@xceed.com) so that way we can place you in higher priority. 

    Currently the AsyncFtpClient class is considered obsolete. You should be using FtpClient to login/disconnect. The FtpClient class provides you with all the functionality that the AsyncFtpClient class provides.

    You can refer to the online documentation for the FtpClient class here: http://doc.xceedsoft.com/products/XceedFileSystem/Xceed.Ftp.v5.1~Xceed.Ftp.FtpClient.html. If you are still getting errors (same or different), can you please send me your updated code with some information on your server that you are trying to connect to?

    Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by Marc [Xceed] (had 220 views)

    User (Old forums)
    Member
    Post count: 23064

    Hi,

    As said by you our developer have posted the issue directly to ‘support@xceed.com’, the case number of the post is Case 145827 .

    I also mailed them the whole source code which we use to connect to FTP

    We cannot change the code to implement a new class now since this is used by many clients in our live system to process Feed files.

    Have you ever seen this error MODE S error anywhere?

     I was  able to put Trace in the code and the log is as below

     Connected to 208.185.235.81:21 on 02/09/2011 @ 14:46:35
    < 220 Cornerstone OnDemand, Inc.
    > USER XXXXXXX
    < 331 Password required for XXXXXXX.
    > PASS *****
    < 230
    > MODE S
    < 500 ‘MODE’: command not understood.
    > QUIT
    Disconnected from 208.185.235.81:21 on 02/09/2011 @ 14:46:35

    i removed the user name from the log 

     

    Thanks

    Arun

    Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by Arun (had 1584 views)

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.