I am trying to connect my gRPC client which is written in C# to another gRPC server which is written in C++.
I have configured my gRPC client to use the gRPC server as the endpoint address.
public void ConfigureService(IServiceCollection services)
{
string address = "http://localhost:65000"
services.AddGrpcClient<GreeterService.GreeterServiceClient>(options =>
{
options.Address = new Uri(address);
});
}
At the gRPC server side, it was configured as follows:
CGreeterServer::CGreeterServer()
{
// Other codes in constructor
grpc::ServerBuilder builder;
builder.AddListeningPort("localhost:65000", grpc::InsecureServerCredentials());
builder.RegisterService(m_pGreeterService);
m_pServer = builder.BuildAndStart();
}
I am not sure what is happening but I keep getting error messages on the client side saying that the call has been cancelled or Call failed with gRPC error status. Status code: Internal, Message Error starting gRPC call: An error occurred while sending the request.
Any advice on this issue is greatly appreciated.