Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does .Net Core 2.1 support HTTP/2 requests?

I am working to gRPC in my .Net Core 2.1 application, But when i send a request the server throws an error stating

Connection id "" bad request data: "Unrecognized HTTP version: 'HTTP/2.0'

  • Microsoft.AspNetCore.Server.Kestrel.Core.BadHttpRequestException: Unrecognized HTTP version: 'HTTP/2.0'
  • Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpParser`1.RejectUnknownVersion(Byte* version, Int32 length)
  • Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpParser`1.ParseRequestLine(TRequestHandler handler, Byte* data, Int32 length)
  • Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpParser1.ParseRequestLine(TRequestHandler handler, ReadOnlySequence1& buffer, SequencePosition& consumed, SequencePosition&
like image 449
Harsh Nagalla Avatar asked Jan 24 '19 05:01

Harsh Nagalla


People also ask

Does .NET Core support http2?

HTTP/2 is supported with ASP.NET Core in the following IIS deployment scenarios: Windows Server 2016 or later / Windows 10 or later. IIS 10 or later. TLS 1.2 or later connection.

Is .NET Core 2.1 still supported?

NET Core 2.1 will be reaching end of support on August 21, 2021 and after this date we will no longer provide updates including security fixes, or technical support for this version. We strongly recommend you migrate your applications to . NET Core 3.1 or later before this date.

How do I know if http2 is enabled?

Google Chrome offers a quick and easy way to check if HTTP/2 is supported on your SSL-enabled site. First, visit your site in Chrome over HTTPS. There you'll see your site listed with protocol h2, confirming your site works over HTTP/2.


1 Answers

Please checkout documentation here to enable http/2 in kestrel: https://docs.microsoft.com/en-us/aspnet/core/fundamentals/servers/kestrel?view=aspnetcore-2.2#http2-support

like image 58
Umang Avatar answered Sep 25 '22 08:09

Umang