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

查看:44
本文介绍了是否可以在Azure WebApps的Kestrel上直接运行ASP.NET 5网站?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经检查了Web响应,当我将ASP.NET5部署到Azure 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
  • 处理文件/缓存和其他内容的内核模块(内核=更快)
  • 应用程序监视/保持活动(如果Kestrel崩溃,会发生什么情况)
  • 多个主机名单端口(80)重用
  • 完全控制您的过程
  • 更高的整体效果
  • 简单的安装/执行

如果您对失败"表示满意,要点,我仍然会去将您的Kestrel托管在反向代理或NGINX服务器之后.茶was被制成为生产准备就绪"的.但不是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天全站免登陆