Hi there, I'm very new to Rebex and am currently evaluating the HTTPS WebClient as a drop-in replacement for the dotNET classes. The main reason is to get away from system dependencies in the crypto stack that result in unfortunate compatibility issues (e.g. no common cipher suites, even on TLS1.2) with some hosts on some platforms. So I'm very excited to see that Rebex may offer this and so I need to test it out.
Anyway, what I've done is take the standard example code and perform a POST like so (uri is just a string holding the target URI, which in these examples uses HTTPS, and the "data" parameter is a NameValueCollection object from the System.Collections.Specialized namespace):
using (Rebex.Net.WebClient RebexWebClient = new Rebex.Net.WebClient())
byte ResponseBytes = RebexWebClient.UploadValues(uri, data);
string Response = Encoding.UTF8.GetString(ResponseBytes).Trim();
What I have found is that this very basic code is quite unreliable. The debugger (VS2019) throws: System.NullReferenceException: 'Object reference not set to an instance of an object.' on the line above where "UploadValues" is called.
The stacktrace from the Exception shows:
at Rebex.Net.HttpClientResponse.qrsp() at Rebex.Net.HttpResponse.GetResponseStream() at Rebex.Net.WebClient.fpon(HttpRequest fz) at Rebex.Net.WebClient.pihi.qcus(HttpRequest gy) at Rebex.Net.WebClient.fpor[e](Uri gh, String gi, Boolean gj, Func`2 gk) at Rebex.Net.WebClient.fpok(Uri ft, String fu, NameValueCollection fv) at Rebex.Net.WebClient.UploadValues(Uri uri, String method, NameValueCollection values) at Rebex.Net.WebClient.UploadValues(String uri, NameValueCollection values) at MyMethodInMyClass(...)
I'm completely stumped by this since there are no null references in the parameters I am passing, and this seems to be host-specific in some way, though so far during preliminary testing it seems to be random.
All I did was download the HTTPS trial version, install it, and start using it in a test project.