question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Possible? grpc (client) and grpc-dotnet (server)

See original GitHub issue

Hi 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:closed
  • Created 4 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
JamesNKcommented, Feb 17, 2020

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.

Any reason why these libraries don’t target .NET Standard 2.0 ?

Features were added in 2.1 (trailers) that are required.

0reactions
JamesNKcommented, Feb 24, 2020

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found