gRPC for .NET! gRPC is a modern, open source, high-performance remote procedure call (RPC) framework that can run anywhere. gRPC enables client and server applications to communicate transparently, and simplifies the building of connected systems. https://learn.microsoft.com/en-us/aspnet/core/grpc/?view=aspnetcore-3.0
Questions tagged [grpc-dotnet]
87 questions
2
votes
2 answers
protobuf-net.grpc client and .NET Core's gRPC client factory integration
I am experimenting with a gRPC service and client using proto files. The advice is to use gRPC client factory integration in .NET Core (https://learn.microsoft.com/en-us/aspnet/core/grpc/clientfactory?view=aspnetcore-3.1). To do this you register…

Julius
- 735
- 1
- 9
- 25
2
votes
1 answer
How to create a gRPC ContextPropagationToken
I'm creating an in memory gRPC channel for use in testing. (This is in C#). This involves implementing a call invoker, that in turn involves implementing a server call context. One of the methods you need to implement has the following…

Julian Birch
- 2,605
- 1
- 21
- 36
2
votes
0 answers
Grpc multiple clients with their own stream requests invoking a server grpc method fail if > 1 client is used
I create 2 client to invoke 2 different servers with stream requests.
// First client call
using var httpClient1 = new HttpClient(httpClientHandler);
using var channel1 = GrpcChannel.ForAddress("https://127.0.0.1:4555", new GrpcChannelOptions…

Dmitry Dyachkov
- 1,715
- 2
- 19
- 46
1
vote
0 answers
What is the lifetime/scope of ClientInterceptorContext in .NET?
I have a .NET gRPC client on .net 4.6.2 using Grpc.Core library.
I've registered gRPC channel as singleton to reuse it following [this…

Pavel Voronin
- 13,503
- 7
- 71
- 137
1
vote
0 answers
.net GRPC Gateway Routing pattern
I have 2 GRPC services. And want create service which release Gateway Routing pattern. How i can do it ?
i use: .net 7 C# 11
I tried to ask a question to chagpt and he gave this result:
but google doesn't know any exact entry for the method…

padavan
- 714
- 8
- 22
1
vote
0 answers
gRPC calls through proxy server from .NET client failing after updating from .NET Core 3.1 to .NET 6.0
We have a .NET client Desktop application that makes gRPC calls to our servers using Grpc.Net.Client Nuget Package. The application is deployed to one of our customer environments that uses a proxy. After updating the app from .NET Core 3.1 to .NET…

Kiran Kumar
- 51
- 1
- 5
1
vote
0 answers
Cannot connect gRPC Java Client with gRPC .NET server
My gRPC server is implemented in ASP.NET 7 in the following way:
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddLogging(c => c.ClearProviders());
builder.Services.AddGrpc();
var app =…

Johann Heinzelreiter
- 759
- 2
- 7
- 16
1
vote
1 answer
Unexpected behaviour with FieldMask using dotnet core gRPC
From grpc/grpc-dotnet issue #2097
I am new to gRPC and I am not sure if I am implementing the FieldMask in the correct way.
Here are my messages definitions
// Events messages
message Event {
// optional string id = 1 [deprecated = true];
…

PrinceEntree8
- 36
- 8
1
vote
2 answers
Can't get gRPC to work on an existing ASP.NET Core project
I'm trying to add gRPC to an existing ASP.NET Core 7 project. It is an older code-base so its not using the modern WebApplication.CreateBuilder(args) approach.
This is my Configure method where I added MapGrpcService and MapGrpcReflectionService in…

Robert Hegner
- 9,014
- 7
- 62
- 98
1
vote
0 answers
Unable to load balance grpc services using nginx ingress on Docker desktop
What happened:
I have deployed ingress-Nginx using the HELM template. I have deployed a gRpc service and exposed it as ClusterIP service. The service.yaml can be seen. This gRpc service does not need any certificate. I have also created a Kubernetes…

Venkatesh
- 320
- 2
- 18
1
vote
0 answers
"Failed parsing HTTP/2" error calling grpc .net service from python
We are currently experimenting with grpc and json transcoding to enable a delphi client to make server calls. In our stack we have python 3.10 and .net services.
The json transcoding is done using .net 7 with the…

KlemensE
- 130
- 2
- 6
1
vote
0 answers
C# How I can upload file to MinIO (AWS S3 compatible API) via gRPC without buffering data?
How can I upload large files to MinIO (AWS S3 compatible API) via gRPC service without buffering data?
I have gRPC service with following definition:
service MediaService {
rpc UploadMedia(stream UploadMediaRequest) returns…

Vadim Prokopchuk
- 152
- 8
1
vote
1 answer
Is there a way of creating an instance of an object for each client in a gRPC Server?
I am creating a grpc client-server project. For every client I want to instatiate a different object:
My client class looks like:
static void Main(string[] args)
{
Channel channel = new Channel("localhost",…

Álvaro Fernández
- 120
- 7
1
vote
1 answer
Read server streaming into client c#
I'm doing an application using server streaming.
The problem is the client doesn't read the data from the server streaming.
This is my proto service:
service UserService {
rpc GetData(Id) returns (stream DataResponse) {}
}
message Id {
int32…

J.F.
- 13,927
- 9
- 27
- 65
1
vote
0 answers
Grpc service class as Singleton in Grpc.Net
By default Asp.Net Core makes Grpc service class as scoped to handle multithreading of concurrent web requests. But, still we can make Grpc service class as Singleton inside ConfigureServices()
services.AddSingleton
I am doing it…

Sadashiv J P
- 41
- 6