grpc-web
grpc-web copied to clipboard
Is it possible to call .Net 5 Grpc-Web from .Net Framework 4.7.2+ Windows Application?
Hi,
I am trying to convert my current .Net Framework Windows Application to consume Grpc-Web.
The code:
var httpHandler = new GrpcWebHandler(GrpcWebMode.GrpcWebText, new HttpClientHandler());
var channel = GrpcChannel.ForAddress(baseUri, new GrpcChannelOptions
{
HttpHandler = httpHandler
});
_client = new RService.RServiceClient(channel);
But it throws a exception: Grpc.Core.RpcException HResult=0x80131500 Message=Status(StatusCode="Internal", Detail="Error starting gRPC call. ArgumentException: Only supports HTTP/1.0 and HTTP/1.1 request
Is it possible to call .Net 5 Grpc-Web from .Net Framework 6.1+ Windows Application?
I appreciate for you help.
James Lin