简体   繁体   English

将ASP.NET 5(vNext)站点部署到IIS 8

[英]Deploying ASP.NET 5 (vNext) Site to IIS 8

I am attempting to deploy an ASPNET vNext site onto IIS 8. 我正在尝试将ASPNET vNext站点部署到IIS 8上。

The site works wonderfully in development - I can run it using "web" or IISExpress and it builds for all runtime types (coreclr and clr). 该网站在开发过程中运行良好 - 我可以使用“web”或IISExpress运行它,并为所有运行时类型(coreclr和clr)构建。 I can also run the same site on my Mac as well. 我也可以在我的Mac上运行相同的站点。

However, when I deploy it to IIS, as soon as I attempt to hit the site, I receive a 500 error. 但是,当我将其部署到IIS时,只要我尝试访问该网站,就会收到500错误。 The steps I am following to deploy: 我要遵循的部署步骤:

  1. Publish the site to local disk. 将站点发布到本地磁盘。 I go through Visual Studio to do so. 我通过Visual Studio来完成这项工作。 Again, if I run the "web.bat" file that is created as part of the publishing, it works fine (while on that machine). 同样,如果我运行作为发布的一部分创建的“web.bat”文件,它可以正常工作(在该计算机上)。
  2. I then copy the published files to my IIS host. 然后我将发布的文件复制到我的IIS主机。
  3. I point the website to the "wwwroot" folder. 我将网站指向“wwwroot”文件夹。 (This is next to the approot folder.) I believe this works to a point because, I once forgot to copy over the approot, and I at least received an error about it. (这是在approot文件夹旁边。)我相信这是有道理的,因为我曾经忘记复制那个批准,我至少收到了一个关于它的错误。 So...something is happening. 所以...正在发生一些事情。
  4. I then attempt to hit the URL...and I get a 500. 然后我尝试点击URL ...我得到500。

I have ASP.NET 4.5.2 installed. 我安装了ASP.NET 4.5.2。 IIS does have ASP.NET 4.5 + Extensions installed as a feature. IIS确实安装了ASP.NET 4.5 + Extensions作为功能。 When I threw in a quick Index.html page into my web endpoint, it did display, so I believe IIS is at least hosting up information. 当我将一个快速的Index.html页面放入我的Web端点时,它确实显示了,所以我相信IIS至少会托管信息。

I have provided some links to information that I have been able to find on the issue. 我已经提供了一些我在这个问题上能够找到的信息的链接。 Nothing has worked so far and it's rather frustrating. 到目前为止,没有任何工作,而且相当令人沮丧。 I would appreciate any pointing in the correct direction. 我希望任何指向正确的方向。

Leveraging the additional information that Aristos provided from this answer , I was able to get better error messages from IIS. 利用Aristos从这个答案中提供的其他信息,我能够从IIS获得更好的错误消息。 Ultimately, I learned that I needed to deploy the coreclr and not the clr with my application. 最后,我了解到我需要使用我的应用程序部署coreclr而不是clr。

However, over time, I ended up not using IIS at all as Kestrel was better/easier for this particular situation (and a heck of a lot easier to manage). 然而,随着时间的推移,我最终没有使用IIS,因为Kestrel对于这种特殊情况更好/更容易(并且更容易管理)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM