3

I started a new dotnet core with react project on my Windows 8.1 machine.

dotnet new react my-project

When I started debugging in chrome at https://localhost:5001/, I got the following error

ERR_HTTP2_INADEQUATE_TRANSPORT_SECURITY.

Where should I look into?

miftahulrespati
  • 494
  • 4
  • 16
Maciek
  • 161
  • 11
  • Please check if [this github issue](https://github.com/dotnet/aspnetcore/issues/14350) describes the cause. – Fei Han Apr 16 '20 at 06:47

1 Answers1

8

You can configure Kestrel server to serve Http1. Please follow the following instruction to solve the problem -

  1. Go to your project appsettings.json file.

  2. Add below code under "AllowedHosts": "*" line

    "Kestrel": { "EndpointDefaults": { "Protocols": "Http1" } }

Your default appsettings.json file will look like this -

{
   "Logging": {
      "LogLevel": {
         "Default": "Information",
         "Microsoft": "Warning",
         "Microsoft.Hosting.Lifetime": "Information"
      }
   },
   "AllowedHosts": "*",
   "Kestrel": {
      "EndpointDefaults": {
         "Protocols": "Http1"
      }
   }
}

Hope it will solve your problem.

Shalim Ahmed
  • 259
  • 3
  • 6
  • This solves problem for me. But i would like to understand for myself why this happens. Other team members do not have this issue. My OS is windows 10 pro. – Vitaly Leskiv Jan 31 '23 at 14:33
  • https://learn.microsoft.com/en-us/dotnet/core/compatibility/aspnet-core/5.0/kestrel-disables-http2-over-tls – Shalim Ahmed Feb 07 '23 at 04:24