【发布时间】:2020-11-18 06:56:04
【问题描述】:
.NET Core gRPC-Web 客户端在 http://localhost:5000 上调用 ASP.NET Core gRPC-Web 服务器工作正常。
将相同的客户端代码调用服务器部署到具有虚拟应用程序(例如,“http://build.mycompany.ca/myapp”)的 IIS 服务器会导致
Status(StatusCode="Unimplemented", Detail="Bad gRPC response. HTTP status code: 404")
我的 ASP.NET Core 3.1 服务器设置正确。 IE。, app.UseGrpcWeb(new GrpcWebOptions { DefaultEnabled = true });
介于两者之间
app.UseRouting()
和
app.UseEndpoints(endpoints => {
endpoints.MapControllers();
endpoints
.MapGrpcService<GrpcClientService>()
.EnableGrpcWeb();
});
任何想法我在这里缺少什么?
【问题讨论】:
标签: asp.net-core grpc grpc-web