Unable to disable HTTP2 in Blazor Server
See original GitHub issueThe proposed solution to my previous problem (#15123 ) was to disable HTTP2. To do so, I’m using the following Program.cs code:
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Threading.Tasks;
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
namespace Sel.Automate.WebAppServer
{
public static class Program
{
public static void Main(string[] args)
{
CreateHostBuilder(args).Build().Run();
}
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>();
});
public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
WebHost.CreateDefaultBuilder(args)
.ConfigureKestrel((context, options) =>
{
// Disable HTTP/2
// If it's only your development machines that have this problem, you can wrap
// this in `if (context.HostingEnvironment.IsDevelopment())` or some other condition
// that is only true in development.
options.Listen(IPAddress.Loopback, 5001, listenOptions =>
{
listenOptions.Protocols = Microsoft.AspNetCore.Server.Kestrel.Core.HttpProtocols.Http1;
});
});
}
}
Both FF/GC are still not able to load the Blazor Server example due to ERR_HTTP2_INADEQUATE_TRANSPORT_SECURITY
. Any thoughts? Thanks!
OS: Windows 10.0.17763 Build 17763
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (6 by maintainers)
Top Results From Across the Web
Unable to disable HTTP2 in Blazor Server · Issue #15268
The proposed solution to my previous problem (#15123 ) was to disable HTTP2. To do so, I'm using the following Program.cs code: using...
Read more >How to enable HTTP2 in Kestrel - asp.net
In my local Windows 10 and Windows Server 2019 VPS HTTPS works fine, only HTTP2 is not available. In Windows 11 of another...
Read more >HTTP.sys web server implementation in ASP.NET Core
HTTP/2 is enabled by default. If an HTTP/2 connection isn't established, the connection falls back to HTTP/1.1. In a future release of Windows, ......
Read more >Protocols in ASP .NET Core: HTTPS and HTTP/2
This week, we'll be looking at the use of HTTPS in ASP .NET Core projects (using HTTP/1.1 today) and also HTTP/2 support for...
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 Free
Top 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
Or here’s an easier option, update your appsettings.json like this:
Closing this issue as there’s no more action for us to take here.