self hosting asp.net mvc

筅森魡賤 提交于 2019-11-26 21:59:10

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:

  1. Host your own Web Server in your application using IIS 7.0 Hostable Web Core
  2. Creating Hosted Web Core Applications

Please have a look at http://cassinidev.codeplex.com/ It has many advantages for example

  • No need IIS 7 on client machine
  • Support MVC (I have tested myself)
  • Work well with Windows Form and Web Browser Control for packaging as Windows App
  • Cross Win OS platform ( Windows XP, Vista, 7) I have test XP with .NET 4 installed

Hope this helps.

Andras

I know this question is old, but it is still relevant, so with the .NET Core 1.0 + ASP.NET MVC 6 you can self-host your MVC application easily. You can even combine MVC and WebAPI applications into one, and you can decide later if you want to use IIS, IIS Express or the self-hosting feature of the .NET Core.

You can try it if you follow the Yeoman approach from this post: https://stackoverflow.com/a/30314393/980247

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