0 votes
by (790 points)

Our .NET CF 3.5 application connects to different endpoints/URLs using Rebex HTTPS in the latest version 2019R3.

When the Internet connection is not established, we get the following WebException:

System.Net.WebException: Error while processing request. --->
vsdb: Error while processing request. --->
Rebex.Net.ProxySocketException: Unable to resolve hostname. --->
System.Net.Sockets.SocketException: Der angegebene Host ist unbekannt
at System.Net.Dns.ResolveInternal(String hostName)
at System.Net.Dns.GetHostEntry(String hostNameOrAddress)
at vsdh.lkaw(String dt)
at mgvc.ahoo(String gg, Int32 gh, ProxySocketExceptionStatus gi)
at mgve.wtep(EndPoint awi)
at Rebex.Net.ProxySocket.Connect(EndPoint remoteEP)
at Rebex.Net.ProxySocket.Connect(String serverName, Int32 serverPort)
at mguh.idbx(String bci, Int32 bcj, Boolean bck)
at vscy.fjbv()
at vscy.fjbz(Boolean aj)
at vscy.fjcb()
at Rebex.Net.HttpRequest.lrbj()
at Rebex.Net.HttpRequest.lrbi()
at Rebex.Net.HttpRequest.lrbh()
at Rebex.Net.HttpRequest.GetResponse()
at [Our Code]

We would expect WebExceptionStatus.NameResolutionFailure as the value of WebException.Status, because of the Rebex.Net.ProxySocketException: Unable to resolve hostname in the stack (see above).

What I get is WebExceptionStatus.SendFailure as the WebException.Status, which I assume to be a bug.

Applies to: Rebex HTTPS

1 Answer

0 votes
by (144k points)

I confirm this is a bug. Thanks for reporting it and sorry for inconvenience! We will fix it in the next release.

If you would like to get a hotfix when it's available, please let us know.

by (790 points)
moved by

Thank you for the fast response.

Perhaps there is another related bug, when all available network adapters are disabled or disconnected.

With the Windows-integrated HTTP library, we get a WebException with the Status WebExceptionStatus.ConnectFailure and the following stack:

System.Net.WebException: Network is unreachable.
at System.Net.HttpWebRequest.finishGetResponse()
at System.Net.HttpWebRequest.GetResponse()
at [Our Code]

With the Rebex HTTPS library, we get a WebException with the status WebExceptionStatus.SendFailure and the following stack:

System.Net.WebException: Error while processing request. ---> vsdb: Error while processing request. ---> Rebex.Net.ProxySocketException: Unable to resolve hostname. ---> System.Net.Sockets.SocketException: Could not resolve host
at System.Net.Dns.ResolveInternal(String hostName)
at System.Net.Dns.GetHostEntry(String hostNameOrAddress)
at vsdh.lkaw(String dt)
at mgvc.ahoo(String gg, Int32 gh, ProxySocketExceptionStatus gi)
at mgve.wtep(EndPoint awi)
at Rebex.Net.ProxySocket.Connect(EndPoint remoteEP)
at Rebex.Net.ProxySocket.Connect(String serverName, Int32 serverPort)
at mguh.idbx(String bci, Int32 bcj, Boolean bck)
at vscy.fjbv()
at vscy.fjbz(Boolean aj)
at vscy.fjcb()
at Rebex.Net.HttpRequest.lrbj()
at Rebex.Net.HttpRequest.lrbi()
at Rebex.Net.HttpRequest.lrbh()
at Rebex.Net.HttpRequest.GetResponse()
at [Our Code]

The Rebex-internal Rebex.Net.ProxySocketException points to a problem resolving the hostname, but there is obviously no one who could resolve it.

We would expect WebExceptionStatus.ConnectFailure as the value of WebException.Status when there is no network adapter or IP configuration available.

We would expect WebExceptionStatus.NameResolutionFailure as the value of WebException.Status when there is no DNS server in the IP configuration or the configured DNS server does not answer or the DNS server cannot resolve the hostname.

We would expect WebExceptionStatus.SendFailure as the value of WebException.Status when there is a problem sending POST data to the host.

We would expect WebExceptionStatus.ReceiveFailure as the value of WebException.Status when there is a problem receiving data from the host.

by (144k points)
We also noticed these discrepancies when fixing the issue with NameResolutionFailure and they should be fixed in the next release (and the hotfix) as well.
by (790 points)
Very good! Which of the WebExceptionStatus values can we expect from the new library version?
by (144k points)
These might occur: NameResolutionFailure, ConnectFailure, ReceiveFailure, SendFailure, RequestCanceled, ProtocolError, ConnectionClosed, TrustFailure, SecureChannelFailure, ServerProtocolViolation, Timeout, ProxyNameResolutionFailure, UnknownError.
by (144k points)
This has been fixed in 2019 R3.3 release: https://www.rebex.net/total-pack/history.aspx#2019R3.3
...