ProtocolVersion exception using Rebex HTTPS

0 votes
asked Feb 4 by lcrmj (180 points)
edited Feb 5 by lcrmj

Hello,

The lib is throwing the exception below, does anyone know why it happens? It's happening on RC3 running on .NET 4.6

Error while processing request. Fatal error 'ProtocolVersion' has been encountered on the local connection end.
   em Rebex.Net.HttpRequest.vjby()
   em Rebex.Net.HttpRequest.vjbx()
   em Rebex.Net.HttpRequest.vjbw()
   em Rebex.Net.HttpRequest.GetResponse()

Thanks

---Edit---
Inner Exception:

Rebex.Net.HttpException: Error while processing request. 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. ---> Rebex.Net.TlsException: Fatal error 'ProtocolVersion' has been encountered on the local connection end.
   em iudz.wgwn()
   em iudz.wgwo()
   --- Fim do rastreamento de pilha de exceções internas ---
   em iudz.wgwo()
   em iudz.wgwv()
   em itzd.kywx(String awk, Int32 awl, Boolean awm)
   em itzc.Connect()
   em itzc.kywj(Boolean bc)
   em itzc.kywl()
   --- Fim do rastreamento de pilha de exceções internas ---
   em itzc.kywl()
   em Rebex.Net.HttpRequest.vj

1 Answer

0 votes
answered Feb 5 by Lukas Pokorny (102,630 points)

Hello,

This error occurs when TLS packet header contains an improper version number. This might indicate, for eaxmple, a bug in TLS/SSL, a bug in a higher layer (such as sending non-encrypted data despite already having negotiated TLS/SSL), or some kind of misconfiguration.

A communication log created at LogLevel.Verbose should make it possible to tell what is going on.

commented Feb 5 by lcrmj (180 points)
Hi,

I've added the logwriter at verbose level but the file didn't get created... not sure if it helps but I added the inner exception to the OP
commented Feb 6 by Lukas Pokorny (102,630 points)
Unfortunately, we really need to see the log in this case. Would it be possible to try creating the log once again? Start with this code (modify the log path and request URL to  suit your needs):

            // initialize request creator
            var creator = new HttpRequestCreator();
            creator.LogWriter = new FileLogWriter(@"c:\temp\rebex-log.txt", LogLevel.Verbose);

            // issue a request
            var request = creator.Create("https://test.rebex.net/");
            var response = request.GetResponse();

            // read the response and discard it
            using (var stream = response.GetResponseStream())
            {
                stream.CopyTo(Stream.Null);
            }
            response.Close();
...