运行ASP.NET 5(MVC 6)采用.NET Core上的IIS [英] Run ASP.NET 5 (MVC 6) using .NET Core on IIS

查看:322
本文介绍了运行ASP.NET 5(MVC 6)采用.NET Core上的IIS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚创建了一个快速ASP.NET MVC 5 6上的应用程序的Visual Studio.NET 2015年RC和希望它在Windows 7上我的IIS Web服务器上运行。

I have just created a quick ASP.NET 5 MVC 6 app on Visual Studio.NET 2015 RC and would like it to run on my IIS web server on Windows 7.

通常情况下,当我创建在IIS上的网站,我需要选择一个应用程序池,无论是2.0还是4.0版集成。

Normally, when I create a website on IIS, I need to choose an Application Pool, either v2.0 or v4.0 Integrated.

现在,因为.NET的核心配备了所有的库,包的NuGet,我怎么能在IIS上运行呢?该应用程序池挑选呢?请问这是怎么工作的?

Now because .NET Core comes with all its libraries as nuget packages, how can I run it on IIS? which application pool do I pick? how does this work?

推荐答案

要获取应用程序在IIS上运行:

To get the application to run on IIS:


  1. 创建下4.0版的应用程序池一个网站。

  2. 套装/使用 DNU发布发布应用程序。这将创建一个自包含的包,有应用程序,运行时和所有的依赖。更改运行名称以匹配您选择的运行时间。

  1. Create a website under a v4.0 app pool.
  2. Bundle/publish the application using dnu publish. This will create a self contained package that has the application, the runtime and all the dependencies. Change the runtime name to match the runtime of your choice.

 dnu publish --runtime dnx-coreclr-win-x86.1.0.0-beta5-11625

您甚至可以通过 - 无源如果您不希望应用程序从来源每次启动时编译

You can even pass --no-source if you don't want the application to be compiled from sources every time it starts.

复制软件包(从斌\\输出)的网站根目录下。

Copy the bundle (from bin\output) under the website root.

事情可能出错:


  1. 的IIS位数(32/64位)必须coreclr的位数相匹配。

  2. 如果你不绑定的网站复制网站根目录下,确保在其下运行IIS实际上可以访问该文件夹运行的帐户。

这篇关于运行ASP.NET 5(MVC 6)采用.NET Core上的IIS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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