Unable to make a connection between trivial C# gRPC client and server
Similar to Matěj Zábský I was struggling with "Stream removed" error and failed to get my BloomRPC to call my code. My circumstances were slightly different - my server portion was written with new Grpc.AspNetCore NuGet package in .NET Core 3, where as client was using a Grpc.Core Nuget package (that is compatible with older .NET Frameworks). To get it fixed, on Server side of gRPC I've made this change (I hope this helps someone):
From:
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>();
});
To:
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.ConfigureKestrel(options =>
{
// This endpoint will use HTTP/2 and HTTPS on port 5001.
options.Listen(IPAddress.Any, 5001, listenOptions =>
{
listenOptions.Protocols = HttpProtocols.Http2;
});
});
webBuilder.UseStartup<Startup>();
});