ASP.NET项目5托管在IIS上 [英] ASP.NET 5 project hosting on IIS

查看:171
本文介绍了ASP.NET项目5托管在IIS上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想举办它采用MVC 6和亚马逊实体框架7免费微比如我的ASP.NET项目5。
我找不到任何一步一步如何承载ASP.NET在IIS 5个项目上人工,所有材料只提这是可能的,但没有任何指导。
基本上,我部署到本地文件夹,然后复制到新创建的网站,但没有什么工作。
不幸的是,我不能使用Azure的,因为它只有一个免费试用一个月,不是一年。

I want to host my ASP.NET 5 project which uses MVC 6 and Entity Framework 7 on Amazon free micro instance. I can't find any step-by-step manual on how to host ASP.NET 5 projects on IIS, all materials just mention that this is possible but without any guides. Basically, I'm deploying to local folder and then copying to newly created site, but nothing is working. Unfortunately, I can't use Azure as it only has one month free trial, not a year.

推荐答案

我在使用Visual Studio 2015年preVIEW创建ASP.NET 5个项目。我不认为这是现在很难在IIS上部署。
首先在VS 2015年preVIEW发布为文件系统发布您的网站,然后发布的文件夹复制到你的服务器,在IIS中创建一个应用程序和应用程序文件夹设置到wwwroot文件夹(而不是根文件夹),这是所有。
请注意,检查是否Microsoft.AspNet.Server.IIS在您的网站project.json存在发布之前。

I'm using Visual Studio 2015 Preview to create ASP.NET 5 projects. I don't think that's difficult to deploy on IIS now. First publish your website by publishing it as file system in VS 2015 preview, then copy the published folder to your server, create an application in IIS and set the application folder to the wwwroot folder (rather than the root folder), that's all. Be aware, check if "Microsoft.AspNet.Server.IIS" exists in your website project.json before publishing it.

编辑:
应该有wwwroot文件夹一个web.config,web.config中的内容可能(出版时precompile选项)是这样的:

there should be a web.config in wwwroot folder, the content of web.config may be like this (with precompile option when publishing):

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <appSettings>
    <add key="kpm-package-path" value="..\approot\packages" />
    <add key="bootstrapper-version" value="1.0.0-beta1" />
    <add key="kre-package-path" value="..\approot\packages" />
    <add key="kre-version" value="1.0.0-beta1" />
    <add key="kre-clr" value="CoreCLR" />
    <add key="kre-app-base" value="..\approot\packages\Rvc.PopUpSite\1.0.0\root" />
  </appSettings>
</configuration>

或像这样(没有precompile选项):

or like this (without precompile option):

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <appSettings>
    <add key="kpm-package-path" value="..\approot\packages" />
    <add key="bootstrapper-version" value="1.0.0-beta1" />
    <add key="kre-package-path" value="..\approot\packages" />
    <add key="kre-version" value="1.0.0-beta1" />
    <add key="kre-clr" value="CoreCLR" />
    <add key="kre-app-base" value="..\approot\src\Rvc.PopUpSite" />
  </appSettings>
</configuration>

请注意的价值KRE-APP-基地。有时它的价值是在Visual Studio发布后空字符串。

Please notice the value of kre-app-base. Occasionally its value is empty string after publishing in Visual Studio.

这篇关于ASP.NET项目5托管在IIS上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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