Is it possible to run ASP.NET 5 site directly on Kestrel in Azure WebApps?

柔情痞子 提交于 2019-11-28 23:59:05
Maxime Rouiller

On Azure Web App, you cannot bypass IIS.

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

What you lose from not using IIS

  • Security (newer component compared to IIS)
  • Easy setup of SSL
  • Kernel module that handle file/cache and other things (kernel = faster)
  • Application monitoring/Keep-Alive (what happens if Kestrel crash)
  • Multiple hostnames single-port (80) reuse
  • etc.

What you gain from not using IIS

  • Complete control over your process
  • Higher overall performance
  • Simpler installation/execution

What you should do if you choose not to use 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.

Your question is a bit ambiguous, as it asks at the same time about Azure Web Apps and about the general case. @Maxime answered the general part, so I'll answer the Azure Web App part.

It is not possible to bypass IIS in Azure Web Apps. Stack that normally run without IIS are typically handled using HttpPlatformHandler (as is the case for ASP.NET 5), or in the case of Node some variant of that (iisnode).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!