Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to self-host a MVC 4 Application without IIS (not Web API)?

  • Google will always find how to self-host Web-API by use of HttpSelfHostServer or OWIN which is not feasable since that's for MVC->Web API and not MVC
  • using Hostable WEB Core is also not an option because you have to install IIS
  • and the approach with CassiniDEv looks also not good for production (at least that's what Sky Sanders tells me here)

So, anybody else has and idea how to go about this?

[Edit] The reason for all those limitations are that it's not going to be a multi-user Web app but just a closed group of people will be accessing it and only on an Intranet so we were looking for a simple solution where we don't have to use any software setup outside our own (which has already update capabilities and handles up-/downgrades) and have full support/access to our already existing internal framework.

like image 498
pastacool Avatar asked Nov 02 '22 04:11

pastacool


1 Answers

after some "creative" googleing (we got inspired by IronScheme - have a look at IronScheme.WebServer and IronScheme.Web.Runtime -> Web/Hosting) and reverse engineering a sample MVC App (just look at the call stack and dig thrugh MSDN) we've found a possible solution.

we're going to utilize System.Web.Hosting.ApplicationHost.CreateApplicationHost for accessing our MVC app and HttpListeneras our own lightweight only-for-our-purpose "webserver".

like image 187
pastacool Avatar answered Nov 08 '22 08:11

pastacool