I have a gRPC service (written in .net core 3.1) deployed in windows server as a self hosted service running in kerstel.
I added the below configuration to get the service running in https.
"Kestrel": {
"EndpointDefaults": {
"Protocols": "Http2"
},
"Endpoints": {
"HttpsInlineCertFile": {
"Url": "https://hostname:8081",
"Protocols": "Http2",
"Certificate": {
"Path": "path to .pfx file",
"Password": "Super secret password"
}
}
}
Using the below code
using GrpcChannel channel = GrpcChannel.ForAddress(httpsHost);
var client = new MyClient(channel);
var response = client.GetEntity(RequestCreator.GetRequest());
Console.WriteLine("Recieved: " + response.ToString());
I get the an below exception and the inner exception is null.
Status(StatusCode=Internal, Detail="Error starting gRPC call: The SSL connection could not be established, see inner exception.")
Is there anything I should be adding to get the client to get the data from the service?
Thanks in advance