grpc-web icon indicating copy to clipboard operation
grpc-web copied to clipboard

Is it possible to call .Net 5 Grpc-Web from .Net Framework 4.7.2+ Windows Application?

Open jameslin0312 opened this issue 3 years ago • 0 comments

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

jameslin0312 avatar Jul 16 '21 10:07 jameslin0312