排名
6
文章
6
粉丝
16
评论
8
{{item.articleTitle}}
{{item.blogName}} : {{item.content}}
ICP备案 :渝ICP备18016597号-1
网站信息:2018-2024TNBLOG.NET
技术交流:群号656732739
联系我们:contact@tnblog.net
公网安备:50010702506256
欢迎加群交流技术
原
NotSupportedException: HTTP/2 over TLS is not supported on Windows 7 due to missing
分类:
net core
.net core grpc报错:NotSupportedException: HTTP/2 over TLS is not supported on Windows 7 due to missing ALPN support
是因为win7不支持TLS的原因
解决方法:在Program.cs中配置不包含 TLS 的 HTTP/2 终结点即可
public static IHostBuilder CreateHostBuilder(string[] args) => Host.CreateDefaultBuilder(args) .ConfigureWebHostDefaults(webBuilder => { //配置不包含TLS的HTTP/2终结点 webBuilder.ConfigureKestrel(options => { options.ListenLocalhost(50001, a => a.Protocols = Microsoft.AspNetCore.Server.Kestrel.Core.HttpProtocols.Http2); }); webBuilder.UseStartup<Startup>(); });
欢迎加群讨论技术,群:677373950(满了,可以加,但通过不了),2群:656732739
评价