錯誤: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");

    });

  });


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM