且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

是否可以直接在 Azure WebApps 中的 Kestrel 上运行 ASP.NET 5 站点?

更新时间:2023-12-02 08:19:58

在 Azure Web App 上,您无法绕过 IIS.

On Azure Web App, you cannot bypass IIS.

但在一般情况下,您绝对可以直接运行 Kestrel.毕竟它只是 dnx web 并且正是 XPlat 版本(Linux、OSX)最终将(几乎)使用的东西.

But in the general case, you can definitely run Kestrel directly. It is after all just dnx web and it's exactly what the XPlat version (Linux, OSX) will end-up using (almost).

  • 安全性(与 IIS 相比更新的组件)
  • 轻松设置 SSL
  • 处理文件/缓存和其他事情的内核模块(内核 = 更快)
  • 应用程序监控/Keep-Alive(如果 Kestrel 崩溃会发生什么情况)
  • 多个主机名单端口 (80) 复用
  • 等等
  • 完全控制您的流程
  • 更高的整体性能
  • 更简单的安装/执行

如果你对输"没问题;点,我仍然会去在反向代理或 NGINX 服务器后面托管你的 Kestrel.Kestrel 被设计成生产就绪".但它不是 NGINX 或 IIS.

If you are OK with the "lose" points, I would still go and host your Kestrel behind a reverse proxy or an NGINX server. Kestrel was made to be "production ready" but it's not NGINX or IIS.

据我所知,它不会保持生命.

It will not keep itself alive as far as I know.

如果我遗漏了什么,请告诉我.

If I missed anything, please let me know.