0

I have a Blazor WebAssembly web application and want to use an existing GRPC service.

When I open a new channel, I get the following error message:

Channel = new Channel(_settings.RemoteAddress, ChannelCredentials.Insecure);
 
'Unsupported architecture "Unknown".'

GRPC service is initialized with Autofac.

Following packages are installed.

Grpc.Net.Client (2.40.0)
Grpc.Net.Client.Web (2.40.0)

Does anyone have an idea whether this is possible with Blazor WebAssembly or what the problem could be?

fkuehne
  • 91
  • 1
  • 6

1 Answers1

0

It looks like you must still have a reference to the older Grpc.Core package. To use Grpc.Net.Client your code should look something like this:

var httpHandler = new GrpcWebHandler(GrpcWebMode.GrpcWebText, new HttpClientHandler());
var channel = GrpcChannel.ForAddress(_settings.RemoteAddress, new GrpcChannelOptions { HttpHandler = httpHandler });
Ed MacDonald
  • 406
  • 4
  • 7