0

I have this configuration for SPA in .NET Core web server (Startup.cs)

public void Configure(IApplicationBuilder app, IWebHostEnvironment env) {
    // ...
    app.UseHttpsRedirection();
    // ...
}

I have enabled the HTTPS configuration for the debugging.

enter image description here

If I remove the app.UseHttpsRedirection(); and disabled the https debugging, it works. But if I enable the `HTTPS this error shows up when loading the SPA bundle:

GET https://localhost:44355/static/js/0.chunk.js net::ERR_HTTP2_PROTOCOL_ERROR 200

It was fine before, I do not know what the cause of this. I suppose the application is requesting the bundle over HTTP and not HTTPS.

I tried to uninstall and reinstall the IIS Express, but the problem still persists. I do not know what the cause of this, please help.

enter image description here

enter image description here

enter image description here

Vy Do
  • 46,709
  • 59
  • 215
  • 313
Alvin Stefanus
  • 1,873
  • 2
  • 22
  • 60
  • Try to run visual studio as an administrator, and you can refer to:https://stackoverflow.com/questions/19417219/ssl-connection-connection-reset-with-iisexpress/22818853#22818853 – Theobald Du May 31 '21 at 02:39
  • I have tried with admin privilege but it does not fix it. – Alvin Stefanus May 31 '21 at 03:43
  • I fix it with @emasnavi solution at https://stackoverflow.com/questions/67747270/reactjs-neterr-http2-protocol-error-200-with-netcore-in-https/67767129#67767129 – Alvin Stefanus May 31 '21 at 03:49

0 Answers0