自托管asp.net的MVC [英] self hosting asp.net mvc

查看:613
本文介绍了自托管asp.net的MVC的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可能到另一个应用程序内,即自主机asp.net的MVC。控制台窗口的形式,服务等等等等。

Is it possible to self host asp.net mvc inside another application ie. console, windows forms, service etc etc.

我想建立一个应用程序,提供了一个Web界面来控制它,我想使用asp.net的MVC为它的网络的一部分。

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.

我也来看看南希看起来像它会工作,但它不是ASP.NET MVC它的确支持剃须刀虽然它不具备支持它的asp.net(如完全一样的水平。强类型的视图)

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)

我也觉得这个问题,但它并没有真正进入深度多
可以使用ASPNET MVC2没有IIS?

I did also find this question but it doesn't really go into much depth Possible to use ASPNET MVC2 without IIS?

推荐答案

您可以使用IIS 7.0承载Web核心和承载Web服务器的任何用户程序的一部分,甚至是控制台应用程序。这样做的好处是,它是非常相似的完全成熟的IIS(包括配置等),但本身在过程运行Web服务器

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.

看一看下面的文章:


  1. 托管自己的Web服务器中使用IIS 7.0承载Web核心<您的应用程序/ A>

  2. 创建托管的Web核心应用程序

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

这篇关于自托管asp.net的MVC的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆