無効な証明書でSignalRサーバに接続しようとしています。当然のことながら、私は次のエラーを取得する:通常の.NETとのc#signalrクライアントでhttps証明書の警告を無視するにはどうすればよいですか?
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.
あなたが証明書の検証動作を変更することができ、ServerCertificateValidationCallback
デリゲートを持っているWebRequestHandler
でそれを構築することができHttpClient
。 SignalR HttpClient
にはこのようなことはありません。
ありがとう、ありがとう。 グローバルは素晴らしいわけではありませんが、テストアセンブリでこれを使用していますので、十分です。 – Dan