Is it possible to self host asp.net mvc inside another application ie. console, windows forms, service etc etc.
I'd like to build an app that offers a web interface to control it and I'd like to use asp.net mvc for the web part of it.
I did take a quick look at Nancy which looks like it would work, though its not asp.net mvc it did support razor although it doesn't have quite the same level of support for it as asp.net (eg. strongly typed views)
I did also find this question but it doesn't really go into much depth Possible to use ASPNET MVC2 without IIS?
ASP.NET Web API can be either be hosted in IIS or in a separate host process. The former approach is usually appropriate when the Web API is part of a web application and one or more web applications are going to consume it.
Yes. In fact, all ASP.NET Core applications are self-hosted.
Self Host just means it uses the built-in Web Server, which is in contrast to classic ASP.NET Framework Web Apps which typically requires IIS or the built-in WebDev server to run.
In this article. This tutorial shows how to host a web API inside a console application. ASP.NET Web API does not require IIS. You can self-host a web API in your own host process.
You can use "IIS 7.0 Hostable Web Core" and host the web server as part of any user process, even a console application. The benefit is that it is very similar to full blown IIS (incl config etc) but the web server itself is running in your process.
Have a look at the following articles:
Please have a look at http://cassinidev.codeplex.com/ It has many advantages for example
Hope this helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With