Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

296
Visualizações
"Failed to load resource: net::ERR_HTTP2_PROTOCOL_ERROR" for React app after upgrading to Visual Studio 2019 16.10.0

After upgrading to VS 16.10.0 (and then 16.10.1) Community Edition a React website no longer runs w/in Visual Studio/IIS Express. The exact same code was just deployed to an Azure app service and works correctly.

The home page is blank and the following error is displayed in the Chrome (Version 91.0.4472.77 (Official Build) (64-bit)) debugger console

"Failed to load resource: net::ERR_HTTP2_PROTOCOL_ERROR"

The solution consists of:

  • C# class library (.NET Core 3.1)
  • C# Web API (.NET Core 3.1)
  • React website

I have tried the following:

  • Cleaned and rebuilt solution
  • Cleared browser cache
  • Uninstalled and re-installed Visual Studio
  • Upgraded Visual Studio from 16.10.0 to 16.10.1
  • Ran npm run build which ran with no errors

Additional Note: I was able to restore a virtual machine w/ Visual Studio 2019 v16.9.4 instead of v16.10.1. Then step by step I installed the latest Windows updates and the exact code base. The site runs correctly in v16.9.4. So the problem seems to be in Visual Studio v16.10.0/v16.10.1

Go to the VS Developer Community and up vote this problem

https://developercommunity.visualstudio.com/t/Failed-to-load-resource:-net::ERR_HTTP2_/1446262

over 4 years ago · Santiago Trujillo
8 Respostas
Responde à pergunta

0

We had the same issue on only the machines that had that KB5003637 installed. We uninstalled it and everything was fine. We decided to upgrade to .net 5 in the end which fixes the issue as it was fairly painless for our projects.

If you can't upgrade try disabling HTTP/2

serverOptions.ConfigureEndpointDefaults(lo => lo.Protocols = Microsoft.AspNetCore.Server.Kestrel.Core.HttpProtocols.Http1);

Mine looks like this for .net core 3.1

public static IHostBuilder CreateWebHostBuilder(string[] args) =>
            Host.CreateDefaultBuilder(args)
                .ConfigureWebHostDefaults(webBuilder =>
                {
                    webBuilder.ConfigureKestrel(serverOptions =>
                    {
                        serverOptions.Limits.MaxRequestBodySize = int.MaxValue;
                        serverOptions.Limits.MinResponseDataRate = null;
                        serverOptions.ConfigureEndpointDefaults(lo => lo.Protocols = Microsoft.AspNetCore.Server.Kestrel.Core.HttpProtocols.Http1);
                    })
                    .UseStartup<Startup>();
                });
        }
over 4 years ago · Santiago Trujillo Relatório

0

this issue (on iis express) on only the OS that had that KB5003637 installed. if you unable delete this update first upgrate windows 10 to last by https://www.microsoft.com/en-ca/software-download/windows10 then you can delete kb5003637

(don't forget disable windows auto update)

over 4 years ago · Santiago Trujillo Relatório

0

I got this error creating a new blazor app vs2019/windows10 update to latest versions. After looking at a prior working blazor project Startup.cs I fixed by commenting out //app.UseHttpsRedirection(); I think this maybe a new project template problem

over 4 years ago · Santiago Trujillo Relatório

0

Disable the SSL from the project properties it will automatically down to http/1 and then enable the javascript debugger for the browser

Hope this will help

over 4 years ago · Santiago Trujillo Relatório

0

I tried everything including rolling back updates and a full reinstall of Windows. Finally, a Microsoft support rep posted a workaround for this that involves disabling HTTP2. This seems to have worked for me as a temporary solution. In summary:

  1. Start the Windows Registry Editor
  2. Navigate to the registry key HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\HTTP\Parameters
  3. Add 2 new REG_DWORD values, EnableHttp2Tls and EnableHttp2Cleartext, to this registry key
  4. Set both values to 0
  5. Reboot the machine

The rep notes:

The registry values disable HTTP/2 on the machine. You can remove those values when the fix to https.sys is published.

over 4 years ago · Santiago Trujillo Relatório

0

In my case, upgrading the project to .Net core 5.0 (as @SpeedofSpin suggested) did not help - I had the same issue.

Disabling SSL (as @samejeep suggested) for application was demanding, because my projects uses IdentityServer4 and it just stopped authenticating after that - so I didn't continue that path.

But as a workaround I have changed all requests for css, js, and static files via non-SSL http:// requests.

So for example, instead of this

<link rel="stylesheet" href="~/css/site.css">

Which would use the current request's protocol https://, I've used absolute paths, e.g.:

<link rel="stylesheet" href="http://localhost/css/site.css">

Note, that I'm stating "http" (not "https") explicitly.

I did that for css styles and js scripts and that was enough for me. I didn't have to do it for images though.

For me this is just a dirty workaround (I'll be waiting for MS to release a patch), but at least it allows me to keep doing my work.

Update:

I've found a better way to disable HTTP/2 via registry on my localhost and that solves the problem too.

over 4 years ago · Santiago Trujillo Relatório

0

I found that disabling SSL (which I think results in IIS Express dropping down to HTTP 1.1) is a workaround.

over 4 years ago · Santiago Trujillo Relatório

0

In my case it was ASP.NET Core Identity that caused the trouble: I had too many roles (user claims) which were stored as session cookies in my browser and caused a "HTTP 400 Bad Request - Request header too long" error. This was showing as HTTP2 protocol error in Chrome and SSL certificate error in Firefox since I was using HTTPS redirection.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda