![]() |
VOOZH | about |
dotnet add package Grpc.Net.Client.Web --version 2.80.0
NuGet\Install-Package Grpc.Net.Client.Web -Version 2.80.0
<PackageReference Include="Grpc.Net.Client.Web" Version="2.80.0" />
<PackageVersion Include="Grpc.Net.Client.Web" Version="2.80.0" />Directory.Packages.props
<PackageReference Include="Grpc.Net.Client.Web" />Project file
paket add Grpc.Net.Client.Web --version 2.80.0
#r "nuget: Grpc.Net.Client.Web, 2.80.0"
#:package Grpc.Net.Client.Web@2.80.0
#addin nuget:?package=Grpc.Net.Client.Web&version=2.80.0Install as a Cake Addin
#tool nuget:?package=Grpc.Net.Client.Web&version=2.80.0Install as a Cake Tool
The .NET gRPC client can be configured to make gRPC-Web calls. This is useful for Blazor WebAssembly apps, which are hosted in the browser and have the same HTTP limitations of JavaScript code. Calling gRPC-Web with a .NET client is the same as HTTP/2 gRPC. The only modification is how the channel is created.
To use gRPC-Web:
GrpcWebHandler:var channel = GrpcChannel.ForAddress("https://localhost:5001", new GrpcChannelOptions
{
HttpHandler = new GrpcWebHandler(new HttpClientHandler())
});
var client = new Greeter.GreeterClient(channel);
var response = await client.SayHelloAsync(new HelloRequest { Name = ".NET" });
The preceding code:
GrpcWebHandler has the following configuration options:
HttpMessageHandler that makes the gRPC HTTP request, for example, HttpClientHandler.Content-Type is application/grpc-web or application/grpc-web-text.
GrpcWebMode.GrpcWeb configures content to be sent without encoding. Default value.GrpcWebMode.GrpcWebText configures content to be base64 encoded. Required for server streaming calls in browsers.GrpcChannelOptions.HttpVersion and GrpcChannelOptions.HttpVersionPolicy can be used to configure the HTTP protocol version.
Traditional gRPC over HTTP/2 supports streaming in all directions. gRPC-Web offers limited support for streaming:
When using gRPC-Web, we only recommend the use of unary methods and server streaming methods.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 was computed. net5.0-windows net5.0-windows was computed. net6.0 net6.0 was computed. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 is compatible. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 netcoreapp2.0 was computed. netcoreapp2.1 netcoreapp2.1 was computed. netcoreapp2.2 netcoreapp2.2 was computed. netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 netstandard2.0 is compatible. netstandard2.1 netstandard2.1 is compatible. |
| .NET Framework | net461 net461 was computed. net462 net462 was computed. net463 net463 was computed. net47 net47 was computed. net471 net471 was computed. net472 net472 was computed. net48 net48 was computed. net481 net481 was computed. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen40 tizen40 was computed. tizen60 tizen60 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
Showing the top 5 NuGet packages that depend on Grpc.Net.Client.Web:
| Package | Downloads |
|---|---|
|
ArmoniK.Api.Client
Package Description |
|
|
M5x.Grpc
Package Description |
|
|
Sitko.Core.Grpc.Client
Sitko.Core is a set of libraries to help build .NET Core applications fast |
|
|
AutoCount2
AutoCount version 2 Core Library |
|
|
FastEndpoints.Messaging.Remote.Core
Core componets of the FastEndpoints remote messaging library |
Showing the top 13 popular GitHub repositories that depend on Grpc.Net.Client.Web:
| Repository | Stars |
|---|---|
|
dotnet/AspNetCore.Docs
Documentation for ASP.NET Core
|
|
|
dodyg/practical-aspnetcore
Practical samples of ASP.NET Core 11, 10, 9, 8.0, 7.0, 6.0, 5.0, 3.1, 2.2, and 2.1,projects you can use. Readme contains explanations on all projects.
|
|
|
FastEndpoints/FastEndpoints
A light-weight REST API development framework for ASP.NET 8 and newer.
|
|
|
abpframework/abp-samples
Sample solutions built with the ABP Framework
|
|
|
gustavnavar/Grid.Blazor
Grid component with CRUD for Blazor (client-side and server-side) and ASP.NET Core MVC
|
|
|
havit/Havit.Blazor
Free Bootstrap 5 components for ASP.NET Blazor + optional enterprise-level stack for Blazor development (gRPC code-first, layered architecture, localization, auth, ...)
|
|
|
microsoft/RockPaperScissorsLizardSpock
Rock, Paper, Scissors, Lizard, Spock - Sample Application
|
|
|
SteveSandersonMS/BlazeOrbital
Sample application for Blazor WebAssembly on .NET 6
|
|
|
chunliu/AzureDesignStudio
A web app that helps you create the architecture design diagram for your Azure solutions and automatically generate IaC code from it.
|
|
|
sitkoru/Sitko.Core
Sitko.Core is a set of libraries to help build .NET Core applications fast
|
|
|
anuviswan/LearningPoint
A repository for learning different technologies, frameworks, features......
|
|
|
Redth/Maui.UITesting
Experimenting with UI Testing approaches for .NET / MAUI
|
|
|
max-ieremenko/ServiceModel.Grpc
Code-first for gRPC
|
| Version | Downloads | Last Updated |
|---|---|---|
| 2.80.0 | 104,426 | 4/30/2026 |
| 2.80.0-pre1 | 220 | 4/1/2026 |
| 2.76.0 | 768,856 | 12/19/2025 |
| 2.76.0-pre1 | 1,448 | 11/13/2025 |
| 2.71.0 | 1,447,706 | 4/25/2025 |
| 2.71.0-pre1 | 837 | 4/16/2025 |
| 2.70.0 | 812,351 | 3/10/2025 |
| 2.70.0-pre1 | 388 | 2/26/2025 |
| 2.67.0 | 1,422,993 | 11/21/2024 |
| 2.67.0-pre1 | 1,153 | 10/22/2024 |
| 2.66.0 | 839,515 | 9/20/2024 |
| 2.66.0-pre1 | 1,930 | 9/6/2024 |
| 2.65.0 | 484,158 | 7/27/2024 |
| 2.65.0-pre1 | 391 | 7/20/2024 |
| 2.64.0 | 194,464 | 7/19/2024 |
| 2.64.0-pre1 | 297 | 7/15/2024 |
| 2.63.0 | 724,990 | 5/24/2024 |
| 2.63.0-pre1 | 544 | 5/8/2024 |
| 2.62.0 | 695,466 | 3/29/2024 |
| 2.62.0-pre1 | 645 | 3/8/2024 |