1

For Mono, it is explicit that ASP.NET can be hosted outside IIS on Apache or Nginx

Since the 1.0.0 release is nearby, I was looking at the publishing aspects of open source ASP.NET vNext.

Can ASP.NET vNext be hosted outside of IIS on a *nix server such as Ubuntu?

Zameer Ansari
  • 28,977
  • 24
  • 140
  • 219
  • 1
    From everything that I have seen, using kestrel behind nginx (running as a reverse proxy to handle security, SSL, etc...) is the way the go... From the insane performance/throughput numbers that kestrel has been recently posting using it in this configuration could be a reality soon. I would post this question to the next ASP.Net Community standup live stream https://live.asp.net. Watch the last stream starting here for kestrel perf : https://youtu.be/CJeWIWkhVow?t=28m42s – SushiHangover Jan 07 '16 at 08:06
  • @SushiHangover Wow! One more thing - as of **this right moment** how will you host ASP.NET web projects on some Ubuntu server? – Zameer Ansari Jan 07 '16 at 08:13
  • 1
    wow, a lot can effect my answer on that... as a contractor I been involved with running Ubuntu server using nginx that is front-hosting Mono/ASP.NET... small and large scale (AWS & Azure) mainly for mobile web services running thousands of users to one that ran more than 2 million unique users a day (x ~20 requests per user), but it REALLY depends upon your application and what the "wizard is doing behind the curtain"... – SushiHangover Jan 07 '16 at 08:20
  • 1
    That said, currently the 'safe' route is Windows/IIS of course.... Azure makes that really safe/easy to host and scale... Once dotnet, asp.net5, etc.. go 1.0, I would be testing the hack out of it on *nix to determine where it falls down, where it excels, etc... again, depending upon what your app is actually doing on the server(s) and what the tiers/endpoints behind can handle would determine my direction... – SushiHangover Jan 07 '16 at 08:27
  • @SushiHangover Sure, that's great! I'll also put my insights if I find something unusual. – Zameer Ansari Jan 07 '16 at 09:04
  • @SushiHangover I think kestrel is [already available, isn't it](https://docs.asp.net/en/latest/fundamentals/servers.html#choosing-a-server)? – Zameer Ansari Jan 11 '16 at 06:48
  • 1
    kestrel is open source, so yes it is available anytime you want it... ;-) I believe 1.0.0-rc1 got tagged Nov'15, have not looked at any roadmap to see if there are published timelines for a 'GA'-style release... Clone the repo and build it and start testing. – SushiHangover Jan 11 '16 at 07:14
  • @SushiHangover and 'GA'-style release [means](http://i.stack.imgur.com/d1X27.png)? Google made me laugh – Zameer Ansari Jan 11 '16 at 07:19
  • 1
    ROFL.... ;-) Try Jon Skeet's answer to that one instead @ http://stackoverflow.com/a/2107490/4984832 – SushiHangover Jan 11 '16 at 07:58
  • 1
    https://docs.asp.net/en/latest/fundamentals/servers.html – Paolo Fulgoni Jun 07 '16 at 09:31
  • @PaoloFulgoni - I'll have a look at it, I've temporarily paused the vNext project. Thanks for your inputs – Zameer Ansari Jun 07 '16 at 09:33

3 Answers3

2

Yes, ASP.NET Core can be hosted at linux. Have you tried this documentation, in which helps to install in Ubuntu 14.04?

mqueirozcorreia
  • 905
  • 14
  • 33
1

I dont know if it is working with Nginx, but Apache Server has a module called mod_asp which is a bridging component to the .NET runtime. Maybe that one is worth a try.

Hühnergott
  • 76
  • 2
  • 4
  • I'm curious to see someone of [us](http://stackoverflow.com/users) who ***actually did it***. Anyways this was something new I heard. Thanks! – Zameer Ansari Jan 07 '16 at 07:42
1

AspNet Core has its own web server called Kestrel. Anytime you run an Asp.Net Core web app you run it using this server. IIS or Nginx are used as reverse proxies you can use when you want to expose your app in the wild (they can handle authentication etc.). During development you can just Kestrel directly without have to set up IIS or Nginx.

Pawel
  • 31,342
  • 4
  • 73
  • 104