self hosting asp.net mvc

前端 未结 3 424
灰色年华
灰色年华 2020-11-28 06:22

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

3条回答
  •  甜味超标
    2020-11-28 07:20

    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

提交回复
热议问题