I'm attempting to connect to a SignalR server with an invalid certificate. Unsurprisingly I get the following error:
System.Net.Http.HttpRequestException : An error occurred while sending the request.
----> System.Net.WebException : The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.
----> System.Security.Authentication.AuthenticationException : The remote certificate is invalid according to the validation procedure.
With the normal .Net HttpClient
you can construct it with a WebRequestHandler
that has a ServerCertificateValidationCallback
delegate, allowing you to change the certificate validation behaviour. The SignalR HttpClient
appears to have none of this.