麒麟正青春

 

错误: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");

    });

  });

posted on 2020-08-06 17:15  麒麟正青春  阅读(3936)  评论(0编辑  收藏  举报

导航