是否可以直接在 Azure WebApps 中的 Kestrel 上运行 ASP.NET 5 站点? [英] Is it possible to run ASP.NET 5 site directly on Kestrel in Azure WebApps?

查看:22
本文介绍了是否可以直接在 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 站点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆