服务器未公开服务

时间:2019-09-04 11:33:13

标签: c# reflection grpc

当我像这样在C#服务器中启用服务器反射时

var reflectionServiceImpl = new ReflectionServiceImpl(Greeter.Descriptor, ServerReflection.Descriptor);
server = new Server()
{
    Services =
    {
        // the server will serve 2 services, the Greeter and the ServerReflection
        ServerReflection.BindService(new GreeterImpl()),
        ServerReflection.BindService(reflectionServiceImpl)
    },
    Ports = { { "localhost", 50051, ServerCredentials.Insecure } }
};
server.Start();

当我尝试使用grpc_cli客户端到达此错误

  

“错误”:“目标服务器未公开服务

0 个答案:

没有答案