diff --git a/CommandsService/SyncDataServices/Grpc/PlatformDataClient.cs b/CommandsService/SyncDataServices/Grpc/PlatformDataClient.cs index bcf1b80..6aeab08 100644 --- a/CommandsService/SyncDataServices/Grpc/PlatformDataClient.cs +++ b/CommandsService/SyncDataServices/Grpc/PlatformDataClient.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Net.Http; using AutoMapper; using CommandsService.Models; using Grpc.Net.Client; @@ -22,7 +23,15 @@ public PlatformDataClient(IConfiguration configuration, IMapper mapper) public IEnumerable ReturnAllPlatforms() { Console.WriteLine($"--> Calling GRPC Service {_configuration["GrpcPlatform"]}"); - var channel = GrpcChannel.ForAddress(_configuration["GrpcPlatform"]); + + var httpHandler = new HttpClientHandler(); + //allow certificates that are untrusted/invalid + httpHandler.ServerCertificateCustomValidationCallback = + HttpClientHandler.DangerousAcceptAnyServerCertificateValidator; + + var channel = GrpcChannel.ForAddress(_configuration["GrpcPlatform"], + new GrpcChannelOptions { HttpHandler = httpHandler }); + var client = new GrpcPlatform.GrpcPlatformClient(channel); var request = new GetAllRequest();