VS2017新建的一个项目发布到Linux,在浏览器输入 http://localhost:5000会自动跳到https://localhost:5001

出现Your connection is not secure的错误

 

 

 

解决方法:

在Progam.cs输入此段代码:

var host = new WebHostBuilder()
.UseUrls("http://localhost:5001")
.UseKestrel()
.UseContentRoot(Directory.GetCurrentDirectory())
.UseIISIntegration()
.UseStartup<Startup>()
.Build();

host.Run();

 

 在浏览器输入localhost:5001 即可访问

安装部署步骤(一)

https://blog.csdn.net/hailang2ll/article/details/79759241

守护进程supervisor(二)

https://blog.csdn.net/hailang2ll/article/details/79990507

 

转载于:https://www.cnblogs.com/cuijx123/p/10256586.html

Logo

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。

更多推荐