Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/284.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 如何在Elasticsearch Nest客户端中忽略证书检查?_C#_<img Src="//i.stack.imgur.com/RUiNP.png" Height="16" Width="18" Alt="" Class="sponsor Tag Img">elasticsearch_Https_Nest - Fatal编程技术网 elasticsearch,https,nest,C#,elasticsearch,Https,Nest" /> elasticsearch,https,nest,C#,elasticsearch,Https,Nest" />

C# 如何在Elasticsearch Nest客户端中忽略证书检查?

C# 如何在Elasticsearch Nest客户端中忽略证书检查?,c#,elasticsearch,https,nest,C#,elasticsearch,Https,Nest,我正在asp.net核心应用程序中使用弹性搜索和嵌套客户端。 我的网关正在使用https协议()。我的网关只重定向所有请求 当我试图通过网关向弹性搜索发送请求时,引发如下异常: Invalid NEST response built from a unsuccessful low level call on GET: /es/_cluster/health # Audit trail of this API call: - [1] BadRequest: Node: http://localh

我正在asp.net核心应用程序中使用弹性搜索和嵌套客户端。 我的网关正在使用https协议()。我的网关只重定向所有请求

当我试图通过网关向弹性搜索发送请求时,引发如下异常:

Invalid NEST response built from a unsuccessful low level call on GET: /es/_cluster/health # Audit trail of this API call: - [1] BadRequest: Node: http://localhost:8080/es/ Took: 00:00:00.1932641 # OriginalException: System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.Http.WinHttpException: The server returned an invalid or unrecognized response at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Threading.Tasks.RendezvousAwaitable`1.GetResult() at System.Net.Http.WinHttpHandler.d__105.MoveNext() --- End of inner exception stack trace --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult() at System.Net.Http.DiagnosticsHandler.d__2.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult() at System.Net.Http.HttpClient.d__58.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Elasticsearch.Net.HttpConnection.Request[TResponse](RequestData requestData) # Request: # Response: 看见
var elasticClient = new ElasticClient(connectionSettings);
elasticClient.ClusterHealth();