Possible? grpc (client) and grpc-dotnet (server)
See original GitHub issueHi together,
we have a .net461 LegacyApp (as a Client) and trying to get a gRPC call to a .netcore Kestrel grpc Server App. For the new one, of course we using dotnet-grpc. (Grpc.AspNetCore nupkg) For the LegacyApp we trying the google core lib(s). (Grpc.Core nupkg)
Looking basicly like that:
Server
public class Program
{
public static void Main(string[] args)
{
CreateHostBuilder(args).Build().Run();
}
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseUrls("https://1.2.3.4:3333");
webBuilder.UseStartup<Startup>();
});
}
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
services.AddGrpc();
}
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
app.UseRouting();
app.UseEndpoints(endpoints =>
{
endpoints.MapGrpcService<MyGrpcService>();
});
}
}
Client
var channel = new Channel("1.2.3.4", 3333, ChannelCredentials.Insecure);
var client = new MyGrpcServiceClient(channel);
Console.WriteLine(client.Echo("123"));
Unfortunately, we have not yet managed to get a successful call. When using “google to google” or “grpc-dotnet to grpc-dotnet” all works fine. Is it even possible? If so, what are we doing wrong?
Thank you kl1mm
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Tutorial: Create a gRPC client and server in ASP.NET Core
This tutorial shows how to create a gRPC Service and gRPC client on ASP.NET Core. Learn how to create a gRPC Service project,...
Read more >The future of gRPC in C# belongs to grpc-dotnet
Client and Grpc.AspNetCore.Server nuget packages) is now the recommended gRPC implementation for .NET/C#. The original gRPC C# implementation ( ...
Read more >Getting Started with gRPC and .NET
Creating a Server-Client application with gRPC · 1- First, we need to add a folder to the client project called Protos; · 2-...
Read more >migrating from grpc.core to grpc-dotnet
We want to migrate our project from grpc.core to gprc-dotnet. In my grpc server I reference the packages Grpc.AspNetCore.
Read more >Implementing Microservices with gRPC and .NET Core 3.1
The gRPC framework proposes the RPC model, which is a model where a client invokes a remote procedure that will be executed on...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Your ASP.NET Core server is setup with TLS (HTTPS). Your Grpc.Core client is using
ChannelCredentials.Insecure
which means no TLS. You need to update one of them to match the other.Features were added in 2.1 (trailers) that are required.
They’re the same. SslCredentials.Insecure is inherited from ChannelCredentials.
https://googleapis.github.io/google-cloud-dotnet/docs/Google.Cloud.Diagnostics.AspNet/api/Grpc.Core.SslCredentials.html