错误:ERR_HTTP2_INADEQUATE_TRANSPORT_SECURITY
在windows server 2012 datacenter服务器发布asp.net core 3.1,
谷歌浏览器报错ERR_HTTP2_INADEQUATE_TRANSPORT_SECURITY.
百度了很多说法,最终在微软的文档中发现了解决方法。
参看:https://docs.microsoft.com/zh-cn/aspnet/core/fundamentals/servers/kestrel?view=aspnetcore-2.2
https://docs.microsoft.com/zh-cn/aspnet/core/fundamentals/servers/kestrel?view=aspnetcore-3.1
.ConfigureKestrel((context, serverOptions) => {
serverOptions.Listen(IPAddress.Any, 8000, listenOptions => {
listenOptions.Protocols = HttpProtocols.Http1;
listenOptions.UseHttps("testCert.pfx", "testPassword");
});
});