0 votes
by (220 points)
edited

Hi,

I have tried to use this functionnality between two servers (those servers have TLS both and I use proxy sock 5 to connect).

When i call the method, I have this error :

2011-07-18 14:21:10.751 ERROR Ftp(2) Info: Rebex.Net.TlsException: Fatal error 'ProtocolVersion' has been encountered on the local connection end. ---> Rebex.Net.TlsException: Fatal error 'ProtocolVersion' has been encountered on the local connection end.
   at wWGvS.ckSCApZ.AePCoRZ()
   at wWGvS.ckSCApZ.cDtmAOZ()
   --- End of inner exception stack trace ---
   at wWGvS.ckSCApZ.cDtmAOZ()
   at Rebex.Net.TlsSocket.Poll(Int32 microSeconds, SocketSelectMode mode)
   at wWGvS.AgXIfM.NYQdX(Int32 )
   at wWGvS.AgXIfM.BMJzdYZ(Byte[] , Int32 )
   at wWGvS.AgXIfM.BbLKfs(String& , Int32 )
   at wWGvS.AgXIfM.KsZclZ(Int32 )
   at wWGvS.AgXIfM.KsZclZ()
   at Rebex.Net.Ftp.cLttUyZ(String , String , Ftp , Ftp )
   at Rebex.Net.Ftp.CopyToAnotherServer(Ftp destinationServer, String sourcePath, String destinationPath)

Can you help please ?

Thanks in advance

Applies to: Rebex FTP/SSL

3 Answers

0 votes
by (147k points)
edited

This exception is thrown by the TLS/SSL packet parser when the 'protocol version' field of the packet contains a different version than the one negotiated. In practice, the this usually indicates that the received data might not have been a TLS/SSL packet at all - we have seen some FTP servers that have a habit of 'forgetting' that TLS/SSL was in use when sending certain error messages.

To make it possible to tell what might be going on, please try this code:

        try
        {
            ftp.CopyToAnotherServer(...);
        }
        catch (error as TlsException)
        {
            string data = error.GetData(null);
            // what's the content of 'data' string?
        }

And let us know the content of 'data' string.

0 votes
by (220 points)
edited

I have added the line and error.getData(nothing) returns to me : ?n

0 votes
by (220 points)
edited

You were right, it's my fault! I forgot to put 'SecureTransfers' property to 'True' for the servers. It works now.

Thanks

by (147k points)
edited

Thanks for letting us know! It looks like your FTP server doesn't allow non-secured server-to-server transfers, but behaves in a strange way when you attempt that. A normal behavior would be to report an error, which would then be received by Rebex FTP/SSL and reported via an FtpException. But I'm glad to know you solved that anyway!

...