HTTP/2 over TLS was not negotiated on an HTTP/2-only endpoint.
See original GitHub issueProblem: On the server side
Microsoft.AspNetCore.Server.Kestrel[0]
HTTP/2 over TLS was not negotiated on an HTTP/2-only endpoint.
Attempts to solve:
- With .cshtml
@page
@model IndexModel
@{
ViewData["Title"] = "Home page";
}
<h1>Hello, gRPC!</h1>
@using Tasly.Service
@using Grpc.Core
<button class="btn btn-primary" onclick="@SayHello()">RUN</button>
<hr />
<p>@Greeting</p>
@functions {
private string Greeting;
async Task SayHello()
{
var channel = new Channel("localhost:5001", ChannelCredentials.Insecure);
var client = new Greeter.GreeterClient(channel);
var reply = await client.SayHelloAsync(new HelloRequest { Name = "Blazor gRPC Client" });
Greeting = reply.Message;
await channel.ShutdownAsync();
}
}
- The same with .razor (but it doesn’t work) or I used it incorrectly.
If you have any suggestions about how to fix, or if you need more information, please let me know.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Health Check Fails - HTTP/2 over TLS was not negotiated ...
I managed to resolve this by telling the health check client to specifically use HTTP version 2.0 with the following code. services.
Read more >Breaking change: Kestrel: HTTP/2 disabled over TLS on ...
In this article To enable HTTP/2 over Transport Layer Security (TLS) on Windows, two requirements need to be met: Application-Layer Protocol ...
Read more >Adding gRPC Service Reference problem
HTTP/2 over TLS was not negotiated on an HTTP/2-only endpoint. Visual Studiowindows 10.0visual studio 2019 version 16.7.
Read more >tls + proxy_protocol How to set HTTP/2 ALPN?
Hi I'm using tls offloading with proxy_protocol and it's great (I see ... since it's not aware about TLS offload (endpoint is HTTP2...
Read more >How to use HTTP/2 with HttpClient in .NET 6.0
In order to establish an HTTP/2 connection over TLS, applications need to rely on the TLS application-layer protocol negotiation (ALPN) ...
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
This issue occurred for me even though I have used Grpc.Net.Client package. In fact the sample downloaded from https://github.com/aspnet/AspNetCore.Docs also have the same problem.
@AbdoDabbas On the service I had this in the appSettings.json
The c# client had to be changed to use http2 messages like this…