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

编程入门 行业动态 更新时间:2024-10-15 04:24:32
本文介绍了是否可以直接在 Azure WebApps 中的 Kestrel 上运行 ASP.NET 5 站点?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

当我将 ASP.NET5 部署到 azure web 应用程序时,我在 web 响应中检查了服务器是 IIS,所以我猜 IIS 平台处理程序用于将其重定向到 Kestrel.所以我想知道是否可以直接在 Kestrel 上运行,以及它有什么好处/缺点(可能不管它是否在 Azure 中).我想它会快一点,因为 IIS 将从管道中排除,但我想它不应该有太多的开销......

I have checked that in the web response the server is IIS when I deploy ASP.NET5 to azure web app, so I guess the IIS platform handler is used to redirect it to Kestrel. So I am wondering if it is possible to run directly on Kestrel, and what benefits/drawbacks will that have (probably regardless if it's in Azure or not). I suppose it will be a bit faster since IIS will be excluded from the pipline, but it should not be too much overhead I suppose...

推荐答案

在 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.

更多推荐

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

本文发布于:2023-11-14 20:15:14,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1588419.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:可以直接   站点   Azure   Kestrel   WebApps

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!