在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");
});
});